The request for our service looks something like this:
GET http://[SERVICE]/Node:[id].Build?format=mime1,mime2,...,mimeN&template-id=[templateid]
Accept: multipart/mixed
Content-Type: application/json
body: json document
I am attempting to use ApacheBench to test benchmark this. Here is the call I am using:
ab -n 10 -c 2 -T 'application/json' -H 'Accept: multipart/mixed' 'http://phx5qa01c-02b0.stratus.phx.qa.ebay.com/.Build?format=text/html,text/plain&template-id=29b1468f-c8c3-db23-2f6f-74e112795540'
This call goes through, and results in an error since the expected json data is not there.Is there a way in ab to supply the necessary json along with this request. I see there are -p and -u commands to specify an input file, but those are for puts and posts.
GET
method to send data in the first place. Though doing so is not technically prohibited it's unlikely that your use case doesn't violate RFC 2616's requirements for safety and idempotence. Are you using the JSON document as a query string replacement to make a complex query from the resource? Please share your motivation for doing this. – rdlowrey Jun 22 '13 at 21:39ab
, and there's a fairly good reason: HTTP works well because it's standardized. Creating your own query scheme via a GET body complicates things unnecessarily and should generally be discouraged. – rdlowrey Jun 24 '13 at 18:26