java.io.IOException: unexpected end of stream on Connection in android

后端 未结 10 1098
你的背包
你的背包 2020-12-01 12:40

I have web service URL, it working fine. It gives the JSON data.

When I am using HttpURLConnection and InputStream, I am getting this erro

10条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-01 13:09

    Its a server error. It means somehow execution returns to your client without the server sending actual response header.

    If you have control over server code, check that after processing the request, you explicitly send a response header with a response code. That way retrofit knows the request has been processed.

提交回复
热议问题