I am using curl in a bash script to fetch the response of a service as below,
response=$(curl -isb -H \"Accept: application/json\" \"http://host:8080/some/resour
You are specifying the -i
option:
-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...
Simply remove that option from your command line:
response=$(curl -sb -H "Accept: application/json" "http://host:8080/some/resource")