weixin_33701251 2015-03-08 12:42 采纳率: 0%
浏览 19

Apiary.io无效的JSON正文

Here is my invalid JSON Body Error on Apiary.io? What went wrong?

My Request is like that:

var body = {
  //JSON stuff..
};

$.ajax({
  url : 'URL',
  type : 'POST',
  data : body,
  async: false,
  dataType : 'json',
  success : function (data) {
    body['sessionid'] = data['sessionid'];
    SetSessionID(data['sessionid']);
    console.log(data);
  }   
});  
  • 写回答

1条回答 默认 最新

  • 七度&光 2015-04-24 19:55
    关注

    It looks like your JSON request is invalid and is urlencoded instead of JSON-encoded.

    If that wouldn't help, it would help to post the actual data that went over the wire (in case of bug on Apiary side), and the relevant blueprint snippet for the given endpoint.

    评论

报告相同问题?