Making Http Calls #2
Answered
by
daveaglick
isaacrlevin
asked this question in
Q&A
|
Is this supported in Statiq? Say for instance I wanted to query an api to get some data and put it in a view. Would I have to do that in javascript? |
Answered by
daveaglick
Jun 15, 2020
Replies: 2 comments 1 reply
|
Yep, in fact there's even some helper stuff specifically for API use cases:
|
0 replies
Answer selected by
isaacrlevin
|
I am trying to call the tumblr api and get the content of my posts. Is there a guide on how to make http calls with statiq? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yep, in fact there's even some helper stuff specifically for API use cases:
EvaluateScriptorExecuteConfig(basically any time you have access to the execution context), you can callIExecutionContext.CreateHttpClient()to get aHttpClientinstance. This will do similar pooling and management for you like ASPNET Core does.ReadWebmodule: https://github.com/statiqdev/Statiq.Framework/blob/main/src/core/Statiq.Core/Modules/IO/ReadWeb.cs