Skip to content

Commit 24ffa5a

Browse files
committed
Update info on RestTemplate related to 401 status code
Issue: SPR-9367
1 parent 0829cbf commit 24ffa5a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/reference/docbook/remoting.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,6 +1401,12 @@ String result =
14011401
can in turn be configured with credentials information or connection
14021402
pooling functionality.</para>
14031403

1404+
<tip><para>Note that the <literal>java.net</literal> implementation for
1405+
HTTP requests may raise an exception when accessing the status of a response
1406+
that represents an error (e.g. 401). If this is an issue, switch to
1407+
<classname>HttpComponentsClientHttpRequestFactory</classname> instead.
1408+
</para></tip>
1409+
14041410
<para>The previous example using Apache HttpComponents
14051411
<classname>HttpClient</classname> directly rewritten to use the
14061412
<classname>RestTemplate</classname> is shown below</para>

0 commit comments

Comments
 (0)