I know that the data is passed through HTTP, but I'm not sure if I should be passing data through HTTP headers, or HTTP bodies. Which one is the convention for APIs?
Also, theoretically using PHP, which would be easier to process? Based on what I know, using headers seems to be the easiest method.
POST /api/v1/test_params.json HTTP/1.1 Host: rollrbla.de Content-Length: 59 X-Target-URI: http://rollrbla.de Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Connection: Keep-Alive Test-Parameter-1=Test-value-1&Test-Parameter-2=Test-Value-2
POST /api/v1/test_params.json HTTP/1.1 Test-Parameter-2: Test-Value-2 Host: rollrbla.de Test-Parameter-1: Test-Value-1 Content-Length: 0 X-Target-URI: http://rollrbla.de Connection: Keep-Alive
Overall, what would be the best way to process this data, and what is the convention?