You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.
When sending a request with empty body, an IllegalArgumentException is thrown if one uses the new OkHttpRequestFactory. The stacktrace is the following:
java.lang.IllegalArgumentException: method POST must have a request body.
at com.squareup.okhttp.Request$Builder.method(Request.java:244)
at org.springframework.http.client.OkHttpClientHttpRequest.executeInternal(OkHttpClientHttpRequest.java:85)
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48)
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:84)
at org.springframework.http.client.InterceptingClientHttpRequest$RequestExecution.execute(InterceptingClientHttpRequest.java:91)
at my.super.secret.package.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:29)
at org.springframework.http.client.InterceptingClientHttpRequest$RequestExecution.execute(InterceptingClientHttpRequest.java:81)
at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:67)
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48)
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:84)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:536)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:499)
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:447)
This is a regression introduced by the new implementation of OkHttpRequestFactory added by the M3 release.
The text was updated successfully, but these errors were encountered:
@royclarkson looking at OkHttp and Retrofit issues, and it seems this is an intentional requirement. However they working it around in a higher level, by creating an empty body instead of sending a request with absent body. Can't we do the same here?
When sending a request with empty body, an
IllegalArgumentException
is thrown if one uses the newOkHttpRequestFactory
. The stacktrace is the following:This is a regression introduced by the new implementation of
OkHttpRequestFactory
added by the M3 release.The text was updated successfully, but these errors were encountered: