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();
` |
Beta Was this translation helpful? Give feedback.
Answered by
michellaurent
Jul 23, 2024
Replies: 1 comment 3 replies
-
The |
Beta Was this translation helpful? Give feedback.
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-jigsaw
package, I found the missing piece of cake to be able to use theHttp
facade.Adding this into
bootstrap.php
allows to use the Laravel Facade directly.