golang invalid character 'b' looking for beginning of value

后端 未结 4 1844
半阙折子戏
半阙折子戏 2021-01-04 07:35

I am trying to post a json with xml message inside it. However it returns

invalid character \'b\' looking for beginning of value

I think the possible reason

4条回答
  •  有刺的猬
    2021-01-04 08:10

    I have the problem, too. It's because vue request api stringifies the json data, keep request data is json data. like curl apiUrl -H '' -d '{"a":1,"b":2}', not curl apiUrl -H '' -d 'a=1&b=2', I think keep your response is json data will be resolved

提交回复
热议问题