Skip to content

HttpClientErrorException should provide access to response headers #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 1, 2012

Conversation

scothis
Copy link

@scothis scothis commented May 31, 2012

Added HttpHeaders getResponseHeaders() to HttpStatusCodeException and
populating value via DefaultResponseErrorHandler.

Issue: SPR-7938

@poutsma
Copy link
Contributor

poutsma commented Jun 1, 2012

Looks good to me.

Default HTTP errors from RestTemplate now include the response headers
in addition to the response body.  In particular, this enables
inspection of the Content-Type header allowing manual deserialization
of the response body without guessing as to the content type.

* introduced HttpStatusCodeException#getResponseHeaders
* added constructor with headers param for HttpStatusCodeException,
  HttpClientErrorException and HttpServerErrorException
* preserved exsisting constructor signatures
* marked HttpHeaders as Serializable
* generated new serialVersionUID where needed

Issue: SPR-7938
@rstoyanchev rstoyanchev merged commit 9a8e59b into spring-projects:master Jun 1, 2012
cbeams added a commit that referenced this pull request Jun 1, 2012
* SPR-7938:
  Include response headers in RestTemplate exceptions
  Polish web.client exceptions and related classes
@cbeams
Copy link
Contributor

cbeams commented Jun 1, 2012

Thanks, Scott. For future reference, please

  • update your git config to use your vmware address for commits to spring-* projects. You'll notice that b992c3d has been amended to this effect.
  • use @since 3.2 instead of @since 3.2.0. I realize this may seem inconsistent next to @since 3.0.5 declarations, but historically we have always dropped the third digit if zero.

rwinch pushed a commit to rwinch/spring-framework that referenced this pull request Jun 20, 2016
This commit makes messageEncoders a required argument for building a
client request - those are needed to actually encode the body object as
a reactive stream to be written to the HTTP request body.

Removed raw types usage in DefaultHttpRequestBuilder.

DefaultHttpRequestBuilder now uses a UriTemplateHandler to expand URI
templates + variables into a concrete URI.

Fixes spring-projects#80, fixes spring-projects#85, fixes spring-projects#86
rwinch pushed a commit to rwinch/spring-framework that referenced this pull request Jul 13, 2016
This commit makes messageEncoders a required argument for building a
client request - those are needed to actually encode the body object as
a reactive stream to be written to the HTTP request body.

Removed raw types usage in DefaultHttpRequestBuilder.

DefaultHttpRequestBuilder now uses a UriTemplateHandler to expand URI
templates + variables into a concrete URI.

Fixes spring-projects#80, fixes spring-projects#85, fixes spring-projects#86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants