From 24ffa5a706d1b8538ff1359c635905f0f9af9fb5 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 8 Jan 2013 10:47:25 -0500 Subject: [PATCH] Update info on RestTemplate related to 401 status code Issue: SPR-9367 --- src/reference/docbook/remoting.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/reference/docbook/remoting.xml b/src/reference/docbook/remoting.xml index 4bd5acc920..f642f9d653 100644 --- a/src/reference/docbook/remoting.xml +++ b/src/reference/docbook/remoting.xml @@ -1401,6 +1401,12 @@ String result = can in turn be configured with credentials information or connection pooling functionality. + Note that the java.net implementation for + HTTP requests may raise an exception when accessing the status of a response + that represents an error (e.g. 401). If this is an issue, switch to + HttpComponentsClientHttpRequestFactory instead. + + The previous example using Apache HttpComponents HttpClient directly rewritten to use the RestTemplate is shown below