Http client to fetch collection items from a remote source #710
Answered
by
michellaurent
michellaurent
asked this question in
Q&A
|
I would like to use the Laravel Http client to fetch collection items from a remote API. The docs gives an exemple with file_get_contents but I need to gives an API key to fetch the data. Http::withHeaders([
"X-API-Key" => "MyApiKey"
])
->get("https://remote.provider.net/api/v1/forms/".$id."/submissions")
->json();
` |
Answered by
michellaurent
Jul 23, 2024
Replies: 1 comment 3 replies
|
The |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When looking into the
torchlight/torchlight-jigsawpackage, I found the missing piece of cake to be able to use theHttpfacade.Adding this into
bootstrap.phpallows to use the Laravel Facade directly.