![]() Your command line should have a -d/-data inserted before the string you want to send in the PUT, and you want to. I need to be able to cycle through each merchant and output 'clicks' for example. Curl Get, Post, Put and Delete using PHP. How can i output it so the headers are against the data? The application/json request header is passed to the server with the curl -H command-line option and tells the server that the client is expecting JSON in response. Specified 2 headers in $headerData Array.Im trying to convert a CSV response to JSON but it outputs all the headers first and then all the data so they're disconnected. To get JSON with Curl, you need to make an HTTP GET request and provide the Accept: application/json request header. ![]() I am sending the Header with a POST request. Reading response step is the same as GET request.
0 Comments
Leave a Reply. |