I have a web service implemented in Go that returns a JSON structure from an external service. Upon returning the object, it looks like this:
{"otherServiceInfoList":[],"action...
My Go web service just reads the JSON for the snippet:
response, err := ioutil.ReadAll(resp.Body)
and returns it to the client:
w.Write(response)
The response is displayed as-is in Postman, however, Fiddler both adds and adds the answer as follows:
34ee {"otherServiceInfoList":[],"... 0
Pay attention to the leading 34ee and trailing 0 .
Then they push me forward to convert the answer:
"The response is encrypted and may require decoding before verification."
Accepting the prompt removes the original JSON returned. Is Go a w.write method that uses extra characters, or is it specific to Fiddler?
By the way, before writing to the buffer, I set the following header:
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
source share