1

I have an endpoint that returns the following response,

curl -X 'POST' \
  'https://localhost:7135/api/v1/Initiate' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json'

returns

"{\"ID\":\"987139672\"}"

Notice the \ after key and value.

Vs.

curl -X 'POST' \
  'https://localhost:7135/api/v1/Initiate' \
  -H 'accept: text/plain' \
  -H 'Content-Type: application/json'

returns

{"ID":"987139673"}

Why is it happening?

tRuEsAtM
  • 3,517
  • 6
  • 43
  • 83

0 Answers0