HTML response from server

后端 未结 8 1584
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-13 11:21

I have an app that submits some from data to a local server and as a result the server will send back a JSON. say {status:\"success\"}

Its working when I run the ap

相关标签:
8条回答
  • 2021-01-13 11:37

    It looks like the accept header of your requests states text/html instead of application/json. Change it.

    0 讨论(0)
  • 2021-01-13 11:39

    The Galaxy Tab must be sending different headers to the emulator. Try disabling the expectation header on your HttpPost object.

    httppost.getParams().setBooleanParameter( "http.protocol.expect-continue", false )
    

    Also see expectation failed in android during photo upload

    0 讨论(0)
提交回复
热议问题