Created
June 27, 2020 23:19
-
-
Save donchan922/1669693ff74b16cd23354f2a1ea74dd2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
Response response = restTemplate.getForObject("http://localhost:8080/error", Response.class); | |
} catch(RestClientResponseException exception) { | |
exception.getRawStatusCode(); // HTTPステータスコード | |
exception.getResponseHeaders(); // レスポンスヘッダ | |
exception.getResponseBodyAsString(); // レスポンスボディ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment