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

后端 未结 10 1078
你的背包
你的背包 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:17

    Just found out the solution
    It is really a server side problem AND The solution is to send the content-length header
    If you are using php just make your code like this

    
    

    The trick used here is to send the content-length header using the output buffer

提交回复
热议问题