Android HTTPPost Returns Error “Method not allowed.”

前端 未结 3 1840
情深已故
情深已故 2020-12-03 19:42

I\'m coding an Android 2.2 app that POSTs a json stringentity to a ReSTfull web service.

Fiddler calls to the web service with identical Json return as expected, and

3条回答
  •  渐次进展
    2020-12-03 20:13

    The above issue often occurs if the request type in the service is WebGet e.g

    WebGet(UriTemplate = "login/?name={name}&password={password}", ResponseFormat = WebMessageFormat.Json)"
    

    and you try to access the method using HttpPost via android.

    I have the same issue and it took me hours just to figure it out.

提交回复
热议问题