Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 4 months ago. Improve this question I am getting null response in laravel after dd(); ,however in Postman i
Tag: guzzle
Undefined property: $client while trying to get some information
I’m using Laravel v5.8 and guzzlehttp of v7.4 and tried to write this Controller for getting some information: But now when I call the method getInfo, I get this error message: Undefined property: AppHttpControllersTavanmandAppResultController::$client However the docs says calling the uri’s like this. So what’s going wrong here? How can I solve this issue? Answer The scope of your $client
Google Chat API. Can’t create space. Method not found
I’m trying to create a google chat space via making a post request to https://chat.googleapis.com/v1/spaces with Guzzle. In response I’m getting: But if I change the body of the request and add some new invalid fields like this: I’m getting the next response: docs: https://developers.google.com/chat/api/reference/rest/v1/spaces/create What’s wrong with my original request? Thanks. Answer The spaces.create documentation explains this at the
Laravel Http Client add api key into request
On my Laravel project (laravel version 9) I have to connect on a third part api using an apikey on the url and I have to get the response in json format. To not having to repeat the same code over and over and over I’m trying to use the Http Client Macro for setting the base url, make sure
MS Graph | PHP | GET Photo – Laravel 404 exception
I’m building a website with Azure authentication using MS Graph. As you can see below I want to login and get my own data as well as my managers which is working fine, however the issue begins when I want to select the photo. When a user does not have a profile photo set it will return a 404 Not
Guzzle: Sending POST with Nested JSON to an API
I am trying to hit a POST API Endpoint with Guzzle in PHP (Wordpress CLI) to calculate shipping cost. The route expects a RAW JSON data in the following format: Link to the API I am consuming: https://developers.cjdropshipping.com/api2.0/v1/logistic/freightCalculate I’ve also tried using ‘json’ => $body instead of the ‘body’ parametar. I am getting 400 Bad Request error. Any ideas? Answer
Guzzle Symfony scrape iframes inside multiple Servers
I am building a scraper to scrape content using guzzle and symfony dom crawler But I run into an issue. The page I am scraping has multiple Iframe servers They default iframe is shown when the scraper loads the page but in order to get the other servers it needs to click there buttons and so it reflects the server
How to set referer Header in Guzzle and get CDN Content
I want to scrape a website and am using guzzle 7.4 and Symfony Dom Crawler I successfully retrieved the HTML data But the website is using CDN to host some resources and they are not loading because the header is not sent to get those resources below is code retrieving html If I access the CDN directly and set referer
Transforming Twilio library request into Guzzle request
unfortunately our project runs on PHP 7.0 and we cannot upgrade it for now. And Twilio’s library uses PHP 7.2+ on the version that contains the trusthub API support. So I’m trying to do the request “Create EndUser of type: customer_profile_business_information” from this doc page using Guzzle instead of their library, and I’m following instructions from the curl example. Everything
Laravel uses incorrect database when Http request is sent from another Laravel app
I seem to be running into a weird issue. I am triggering a post request using the Http facade from a laravel app to another laravel app. Both these apps are linked to separate databases. When I try to trigger the same endpoint using postman, it works fine but when the request is triggered from the other laravel app, the