在我的应用程序中,我正在使用 okhttp3 和 retrofit2 发送请求。这是我通过HttpLoggingInterceptor
记录的请求:
okhttp3.OkHttpClient: --> POST https://something/here http/1.1
okhttp3.OkHttpClient: Content-Type: application/json; charset=UTF-8
okhttp3.OkHttpClient: Content-Length: 2596
okhttp3.OkHttpClient: --> END POST (2596-byte body)
我的服务器上有这个
@Consumes("application/json; charset=UTF-8")
当前,继续获取HTTP 415错误代码。
环境: