mirror of https://github.com/apache/jclouds.git
Fix Accept header and removed Content-Type from common headers
This commit is contained in:
parent
338966f3b9
commit
a53438159a
|
@ -35,6 +35,8 @@ import org.jclouds.util.Strings2;
|
||||||
|
|
||||||
import com.google.common.base.Throwables;
|
import com.google.common.base.Throwables;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
import com.google.common.net.HttpHeaders;
|
||||||
|
import com.google.common.net.MediaType;
|
||||||
import com.google.common.reflect.TypeToken;
|
import com.google.common.reflect.TypeToken;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import com.google.gson.JsonParser;
|
import com.google.gson.JsonParser;
|
||||||
|
@ -120,7 +122,7 @@ public class BaseOpenStackMockTest<A extends Closeable> {
|
||||||
* Ensure json headers are included
|
* Ensure json headers are included
|
||||||
* */
|
* */
|
||||||
public MockResponse addCommonHeaders(MockResponse mockResponse) {
|
public MockResponse addCommonHeaders(MockResponse mockResponse) {
|
||||||
mockResponse.addHeader("Accept:", "application/json").addHeader("Content-type", "application-json");
|
mockResponse.addHeader(HttpHeaders.ACCEPT, MediaType.JSON_UTF_8.withoutParameters());
|
||||||
return mockResponse;
|
return mockResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue