Sending JSON or XML as Post using Curl using linux/bash


You can post json data to server using curl in following way Options: -i, --include (HTTP) Include the HTTP-header in the output. The HTTP-header includes things like server-name, date of the document, HTTP-version and more -H, --header (HTTP) Extra header to include in the request when sending HTTP to a server. You may specify any … Continue reading Sending JSON or XML as Post using Curl using linux/bash

Read Json Request in PHP


To receive curl post request you can directly get it from php://input as all input variables like below and you can get json as follow