Unlike when it is given in command line, JSON is escaped when given in urls.txt which causes problems with backends expecting clean json via "application/json" content type.
urls.txt:
https://domain.com POST {"filter": "some_filter"}
Gives printed output as:
POST / HTTP/1.0
Host: domain.com
Accept: */*
Accept-Encoding: gzip;deflate
User-Agent: Mozilla/5.0 (apple-x86_64-darwin17.0.0) Siege/4.0.4
Connection: close
Content-type: application/json
'{"filter": "some_filter"}'
unlike when run from command line like this:
siege --content-type="application/json" -c 1 -d 1 -i -t 5m -v -p 'https://domain.com POST {"filter":"some filter"}'
gives output:
POST / HTTP/1.0
Host: domain.com
Accept: */*
Accept-Encoding: gzip;deflate
User-Agent: Mozilla/5.0 (apple-x86_64-darwin17.0.0) Siege/4.0.4
Connection: close
Content-type: application/json
{"filter": "some_filter"}
Unlike when it is given in command line, JSON is escaped when given in urls.txt which causes problems with backends expecting clean json via "application/json" content type.
command line example:
siege --content-type="application/json" -c 1 -d 1 -i -t 5m -v -p -f urls.txt
urls.txt:
https://domain.com POST {"filter": "some_filter"}
Gives printed output as:
unlike when run from command line like this:
siege --content-type="application/json" -c 1 -d 1 -i -t 5m -v -p 'https://domain.com POST {"filter":"some filter"}'
gives output:
(no quotes around json)
Help is appreciated. Thanks, Eduard