SPR-8986 RestTemplate throws IllegalArgumentException when HTTP status is not in the HttpStatus enum

- Added getRawStatusCode
This commit is contained in:
Arjen Poutsma
2012-01-23 14:26:11 +01:00
parent ff9ad7adc6
commit 8980ce712d
7 changed files with 67 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2011 the original author or authors.
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -291,6 +291,10 @@ public class InterceptingClientHttpRequestFactoryTests {
return statusCode;
}
public int getRawStatusCode() throws IOException {
return statusCode.value();
}
public String getStatusText() throws IOException {
return statusText;
}
@@ -300,7 +304,7 @@ public class InterceptingClientHttpRequestFactoryTests {
}
public InputStream getBody() throws IOException {
return null; //To change body of implemented methods use File | Settings | File Templates.
return null;
}
public void close() {