java.io.IOException: unexpected end of stream on 以及java.io.EOFException: \n not found: limit=0

java.io.IOException: unexpected end of stream on
java.io.OKHttp Caused by: java.io.EOFException: \n not found: limit=0 content=…
encountered when using OkHttp to dock two third-party interfaces This error, the situation is like this, first request the first interface to get a result, and then pass the first result as a parameter to the second interface, but the second interface keeps reporting this error.
The second interface is normal with PostMan, but I have searched all over the Internet for methods.
Tried the following methods
1 retryOnConnectionFailure(true) or retryOnConnectionFailure(false)
2 Add request header addHeader("Connection", "close") or addHeader("Connection", "keep-alive") 3
addHeader("Accept-Encoding" , "identity") or addHeader("Accept-Xml.Encoding", "identity")
will not work.
I have tried all the Android network frameworks like this, and finally found out that the data returned by the first interface is Url-encoded, and the second interface directly transmits the undecoded data, but an error will be reported, and the final decoding and transmission will be normal. Yeah, what a waste of time.

рекомендация

отblog.csdn.net/Flash_D_W/article/details/130420772