1. 19 7月, 2016 1 次提交
  2. 18 7月, 2016 1 次提交
    • B
      Add client-side exception hierarchy · 7a0c2422
      Brian Clozel 提交于
      The `WebClient` has a new exception hierarchy:
      
      * `WebClientException` is the root of all exceptions thrown by the
      `WebClient`
      * `WebClientResponseException` are all exceptions associated with
      specific HTTP response status codes
      * `WebClientErrorException` and `WebServerErrorException` are
      respectively for 4xx and 5xx HTTP status codes
      
      `ResponseExtractor` implementations are adapted to optionally throw
      exceptions if it's impossible to extract the relevant parts of the
      response (e.g. extracting the response body if the response is a 404).
      
      This commit also introduces `ResponseErrorHandler`s that take care of
      the whole exception mapping infrastructure. Since
      `WebClientResponseException`s provide the status, headers and response
      body, we also need a dedicated mechanism to extract information from the
      response body at that level.
      
      The `BodyExtractors` are responsible for extracting that information
      from the exception, given they are provided with all the information
      they need; in that case, message decoders are required.
      
      To convey all this new information downstream, the `WebClient` now wraps
      the message converters and response error handler instances into a
      dedicated `WebClientConfig` object.
      7a0c2422
  3. 16 7月, 2016 4 次提交
  4. 15 7月, 2016 7 次提交
  5. 13 7月, 2016 1 次提交
  6. 07 7月, 2016 2 次提交
  7. 06 7月, 2016 2 次提交
  8. 05 7月, 2016 8 次提交
  9. 01 7月, 2016 3 次提交
  10. 29 6月, 2016 1 次提交
  11. 28 6月, 2016 3 次提交
    • S
      Add BasicAuthorizationInterceptor · db963bc5
      Stephane Nicoll 提交于
      This commit adds a `ClientHttpRequestInterceptor` that applies a BASIC
      authorization header for each request.
      
      It can be used as follows:
      
      ```
      BasicAuthorizationInterceptor basicAuthorization =
          new BasicAuthorizationInterceptor("user", "secret");
      restTemplate.getInterceptors().add(basicAuthorization);
      ```
      
      Issue: SPR-14412
      db963bc5
    • R
      MvcUriComponentsBuilder respects optional params · 2cdcf752
      Rossen Stoyanchev 提交于
      Issue: SPR-14405
      2cdcf752
    • R
      Fix MediaType lookup for ResourceHttpRequestHandler · e38623df
      Rossen Stoyanchev 提交于
      As of 4.3 ResourceHttpRequestHandler delegates to the configured
      ContentNegotiationManager, or one created internally, to look up
      the media type for are resource.
      
      This commit ensures the internally created ContentNegotiationManager is
      correctly injected with the ServletContext through which it can perform
      lookups as before.
      
      Also the ServletPathContentNegotiationStrategy now checks the
      ServletContext first and then delegates to its parent the
      PathContentNegotiationStrategy and not vice versa. This is
      consistent with how handleNoMatch (also in the same class) works
      and also matches how ResourceHttpRequestHandler worked before 4.3.
      
      Issue: SPR-14368
      e38623df
  12. 27 6月, 2016 1 次提交
  13. 18 6月, 2016 1 次提交
  14. 15 6月, 2016 1 次提交
  15. 09 6月, 2016 1 次提交
  16. 08 6月, 2016 3 次提交