Search in sources :

Example 1 with ClientHttpRequestInterceptor

use of cn.taketoday.http.client.ClientHttpRequestInterceptor in project today-infrastructure by TAKETODAY.

the class RestTemplateTests method requestInterceptorCanAddExistingHeaderValueWithoutBody.

@Test
// SPR-15066
void requestInterceptorCanAddExistingHeaderValueWithoutBody() throws Exception {
    ClientHttpRequestInterceptor interceptor = (request, body, execution) -> {
        request.getHeaders().add("MyHeader", "MyInterceptorValue");
        return execution.execute(request, body);
    };
    template.setInterceptors(interceptor);
    HttpHeaders requestHeaders = HttpHeaders.create();
    mockSentRequest(POST, "https://example.com", requestHeaders);
    mockResponseStatus(HttpStatus.OK);
    HttpHeaders entityHeaders = HttpHeaders.create();
    entityHeaders.add("MyHeader", "MyEntityValue");
    HttpEntity<Void> entity = new HttpEntity<>(null, entityHeaders);
    template.exchange("https://example.com", POST, entity, Void.class);
    assertThat(requestHeaders.get("MyHeader")).contains("MyEntityValue", "MyInterceptorValue");
    verify(response).close();
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) MediaType.parseMediaType(cn.taketoday.http.MediaType.parseMediaType) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) HttpMessageConverter(cn.taketoday.http.converter.HttpMessageConverter) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) PUT(cn.taketoday.http.HttpMethod.PUT) DELETE(cn.taketoday.http.HttpMethod.DELETE) HttpHeaders(cn.taketoday.http.HttpHeaders) GenericHttpMessageConverter(cn.taketoday.http.converter.GenericHttpMessageConverter) ByteArrayInputStream(java.io.ByteArrayInputStream) BDDMockito.given(org.mockito.BDDMockito.given) Map(java.util.Map) MockWebServer(okhttp3.mockwebserver.MockWebServer) DefaultUriBuilderFactory(cn.taketoday.web.util.DefaultUriBuilderFactory) ClientHttpRequestInitializer(cn.taketoday.http.client.ClientHttpRequestInitializer) URI(java.net.URI) PATCH(cn.taketoday.http.HttpMethod.PATCH) EnumSet(java.util.EnumSet) BDDMockito.willThrow(org.mockito.BDDMockito.willThrow) RecordedRequest(okhttp3.mockwebserver.RecordedRequest) OPTIONS(cn.taketoday.http.HttpMethod.OPTIONS) Set(java.util.Set) ResponseEntity(cn.taketoday.http.ResponseEntity) ClientHttpResponse(cn.taketoday.http.client.ClientHttpResponse) StreamUtils(cn.taketoday.util.StreamUtils) Collectors(java.util.stream.Collectors) Test(org.junit.jupiter.api.Test) List(java.util.List) POST(cn.taketoday.http.HttpMethod.POST) GET(cn.taketoday.http.HttpMethod.GET) Entry(java.util.Map.Entry) HttpStatus(cn.taketoday.http.HttpStatus) MockResponse(okhttp3.mockwebserver.MockResponse) ClientHttpRequestInterceptor(cn.taketoday.http.client.ClientHttpRequestInterceptor) Mockito.mock(org.mockito.Mockito.mock) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) HashMap(java.util.HashMap) HttpMethod(cn.taketoday.http.HttpMethod) Assertions.assertThatExceptionOfType(org.assertj.core.api.Assertions.assertThatExceptionOfType) TypeReference(cn.taketoday.core.TypeReference) ClientHttpRequestFactory(cn.taketoday.http.client.ClientHttpRequestFactory) ClientHttpRequest(cn.taketoday.http.client.ClientHttpRequest) IOException(java.io.IOException) SimpleClientHttpRequestFactory(cn.taketoday.http.client.SimpleClientHttpRequestFactory) HttpInputMessage(cn.taketoday.http.HttpInputMessage) Mockito.verify(org.mockito.Mockito.verify) HEAD(cn.taketoday.http.HttpMethod.HEAD) Assertions.assertThatIllegalArgumentException(org.assertj.core.api.Assertions.assertThatIllegalArgumentException) HttpEntity(cn.taketoday.http.HttpEntity) MediaType(cn.taketoday.http.MediaType) Collections(java.util.Collections) HttpHeaders(cn.taketoday.http.HttpHeaders) HttpEntity(cn.taketoday.http.HttpEntity) ClientHttpRequestInterceptor(cn.taketoday.http.client.ClientHttpRequestInterceptor) Test(org.junit.jupiter.api.Test)

Example 2 with ClientHttpRequestInterceptor

use of cn.taketoday.http.client.ClientHttpRequestInterceptor in project today-infrastructure by TAKETODAY.

the class RestTemplateTests method requestInterceptorCanAddExistingHeaderValueWithBody.

@Test
// SPR-15066
void requestInterceptorCanAddExistingHeaderValueWithBody() throws Exception {
    ClientHttpRequestInterceptor interceptor = (request, body, execution) -> {
        request.getHeaders().add("MyHeader", "MyInterceptorValue");
        return execution.execute(request, body);
    };
    template.setInterceptors(interceptor);
    MediaType contentType = MediaType.TEXT_PLAIN;
    given(converter.canWrite(String.class, contentType)).willReturn(true);
    HttpHeaders requestHeaders = HttpHeaders.create();
    mockSentRequest(POST, "https://example.com", requestHeaders);
    mockResponseStatus(HttpStatus.OK);
    HttpHeaders entityHeaders = HttpHeaders.create();
    entityHeaders.setContentType(contentType);
    entityHeaders.add("MyHeader", "MyEntityValue");
    HttpEntity<String> entity = new HttpEntity<>("Hello World", entityHeaders);
    template.exchange("https://example.com", POST, entity, Void.class);
    assertThat(requestHeaders.get("MyHeader")).contains("MyEntityValue", "MyInterceptorValue");
    verify(response).close();
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) MediaType.parseMediaType(cn.taketoday.http.MediaType.parseMediaType) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) HttpMessageConverter(cn.taketoday.http.converter.HttpMessageConverter) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) PUT(cn.taketoday.http.HttpMethod.PUT) DELETE(cn.taketoday.http.HttpMethod.DELETE) HttpHeaders(cn.taketoday.http.HttpHeaders) GenericHttpMessageConverter(cn.taketoday.http.converter.GenericHttpMessageConverter) ByteArrayInputStream(java.io.ByteArrayInputStream) BDDMockito.given(org.mockito.BDDMockito.given) Map(java.util.Map) MockWebServer(okhttp3.mockwebserver.MockWebServer) DefaultUriBuilderFactory(cn.taketoday.web.util.DefaultUriBuilderFactory) ClientHttpRequestInitializer(cn.taketoday.http.client.ClientHttpRequestInitializer) URI(java.net.URI) PATCH(cn.taketoday.http.HttpMethod.PATCH) EnumSet(java.util.EnumSet) BDDMockito.willThrow(org.mockito.BDDMockito.willThrow) RecordedRequest(okhttp3.mockwebserver.RecordedRequest) OPTIONS(cn.taketoday.http.HttpMethod.OPTIONS) Set(java.util.Set) ResponseEntity(cn.taketoday.http.ResponseEntity) ClientHttpResponse(cn.taketoday.http.client.ClientHttpResponse) StreamUtils(cn.taketoday.util.StreamUtils) Collectors(java.util.stream.Collectors) Test(org.junit.jupiter.api.Test) List(java.util.List) POST(cn.taketoday.http.HttpMethod.POST) GET(cn.taketoday.http.HttpMethod.GET) Entry(java.util.Map.Entry) HttpStatus(cn.taketoday.http.HttpStatus) MockResponse(okhttp3.mockwebserver.MockResponse) ClientHttpRequestInterceptor(cn.taketoday.http.client.ClientHttpRequestInterceptor) Mockito.mock(org.mockito.Mockito.mock) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) HashMap(java.util.HashMap) HttpMethod(cn.taketoday.http.HttpMethod) Assertions.assertThatExceptionOfType(org.assertj.core.api.Assertions.assertThatExceptionOfType) TypeReference(cn.taketoday.core.TypeReference) ClientHttpRequestFactory(cn.taketoday.http.client.ClientHttpRequestFactory) ClientHttpRequest(cn.taketoday.http.client.ClientHttpRequest) IOException(java.io.IOException) SimpleClientHttpRequestFactory(cn.taketoday.http.client.SimpleClientHttpRequestFactory) HttpInputMessage(cn.taketoday.http.HttpInputMessage) Mockito.verify(org.mockito.Mockito.verify) HEAD(cn.taketoday.http.HttpMethod.HEAD) Assertions.assertThatIllegalArgumentException(org.assertj.core.api.Assertions.assertThatIllegalArgumentException) HttpEntity(cn.taketoday.http.HttpEntity) MediaType(cn.taketoday.http.MediaType) Collections(java.util.Collections) HttpHeaders(cn.taketoday.http.HttpHeaders) HttpEntity(cn.taketoday.http.HttpEntity) MediaType.parseMediaType(cn.taketoday.http.MediaType.parseMediaType) MediaType(cn.taketoday.http.MediaType) ClientHttpRequestInterceptor(cn.taketoday.http.client.ClientHttpRequestInterceptor) Test(org.junit.jupiter.api.Test)

Example 3 with ClientHttpRequestInterceptor

use of cn.taketoday.http.client.ClientHttpRequestInterceptor in project today-framework by TAKETODAY.

the class RestTemplateTests method requestInterceptorCanAddExistingHeaderValueWithBody.

@Test
// SPR-15066
void requestInterceptorCanAddExistingHeaderValueWithBody() throws Exception {
    ClientHttpRequestInterceptor interceptor = (request, body, execution) -> {
        request.getHeaders().add("MyHeader", "MyInterceptorValue");
        return execution.execute(request, body);
    };
    template.setInterceptors(interceptor);
    MediaType contentType = MediaType.TEXT_PLAIN;
    given(converter.canWrite(String.class, contentType)).willReturn(true);
    HttpHeaders requestHeaders = HttpHeaders.create();
    mockSentRequest(POST, "https://example.com", requestHeaders);
    mockResponseStatus(HttpStatus.OK);
    HttpHeaders entityHeaders = HttpHeaders.create();
    entityHeaders.setContentType(contentType);
    entityHeaders.add("MyHeader", "MyEntityValue");
    HttpEntity<String> entity = new HttpEntity<>("Hello World", entityHeaders);
    template.exchange("https://example.com", POST, entity, Void.class);
    assertThat(requestHeaders.get("MyHeader")).contains("MyEntityValue", "MyInterceptorValue");
    verify(response).close();
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) MediaType.parseMediaType(cn.taketoday.http.MediaType.parseMediaType) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) HttpMessageConverter(cn.taketoday.http.converter.HttpMessageConverter) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) PUT(cn.taketoday.http.HttpMethod.PUT) DELETE(cn.taketoday.http.HttpMethod.DELETE) HttpHeaders(cn.taketoday.http.HttpHeaders) GenericHttpMessageConverter(cn.taketoday.http.converter.GenericHttpMessageConverter) ByteArrayInputStream(java.io.ByteArrayInputStream) BDDMockito.given(org.mockito.BDDMockito.given) Map(java.util.Map) MockWebServer(okhttp3.mockwebserver.MockWebServer) DefaultUriBuilderFactory(cn.taketoday.web.util.DefaultUriBuilderFactory) ClientHttpRequestInitializer(cn.taketoday.http.client.ClientHttpRequestInitializer) URI(java.net.URI) PATCH(cn.taketoday.http.HttpMethod.PATCH) EnumSet(java.util.EnumSet) BDDMockito.willThrow(org.mockito.BDDMockito.willThrow) RecordedRequest(okhttp3.mockwebserver.RecordedRequest) OPTIONS(cn.taketoday.http.HttpMethod.OPTIONS) Set(java.util.Set) ResponseEntity(cn.taketoday.http.ResponseEntity) ClientHttpResponse(cn.taketoday.http.client.ClientHttpResponse) StreamUtils(cn.taketoday.util.StreamUtils) Collectors(java.util.stream.Collectors) Test(org.junit.jupiter.api.Test) List(java.util.List) POST(cn.taketoday.http.HttpMethod.POST) GET(cn.taketoday.http.HttpMethod.GET) Entry(java.util.Map.Entry) HttpStatus(cn.taketoday.http.HttpStatus) MockResponse(okhttp3.mockwebserver.MockResponse) ClientHttpRequestInterceptor(cn.taketoday.http.client.ClientHttpRequestInterceptor) Mockito.mock(org.mockito.Mockito.mock) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) HashMap(java.util.HashMap) HttpMethod(cn.taketoday.http.HttpMethod) Assertions.assertThatExceptionOfType(org.assertj.core.api.Assertions.assertThatExceptionOfType) TypeReference(cn.taketoday.core.TypeReference) ClientHttpRequestFactory(cn.taketoday.http.client.ClientHttpRequestFactory) ClientHttpRequest(cn.taketoday.http.client.ClientHttpRequest) IOException(java.io.IOException) SimpleClientHttpRequestFactory(cn.taketoday.http.client.SimpleClientHttpRequestFactory) HttpInputMessage(cn.taketoday.http.HttpInputMessage) Mockito.verify(org.mockito.Mockito.verify) HEAD(cn.taketoday.http.HttpMethod.HEAD) Assertions.assertThatIllegalArgumentException(org.assertj.core.api.Assertions.assertThatIllegalArgumentException) HttpEntity(cn.taketoday.http.HttpEntity) MediaType(cn.taketoday.http.MediaType) Collections(java.util.Collections) HttpHeaders(cn.taketoday.http.HttpHeaders) HttpEntity(cn.taketoday.http.HttpEntity) MediaType.parseMediaType(cn.taketoday.http.MediaType.parseMediaType) MediaType(cn.taketoday.http.MediaType) ClientHttpRequestInterceptor(cn.taketoday.http.client.ClientHttpRequestInterceptor) Test(org.junit.jupiter.api.Test)

Example 4 with ClientHttpRequestInterceptor

use of cn.taketoday.http.client.ClientHttpRequestInterceptor in project today-framework by TAKETODAY.

the class RestTemplateTests method requestInterceptorCanAddExistingHeaderValueWithoutBody.

@Test
// SPR-15066
void requestInterceptorCanAddExistingHeaderValueWithoutBody() throws Exception {
    ClientHttpRequestInterceptor interceptor = (request, body, execution) -> {
        request.getHeaders().add("MyHeader", "MyInterceptorValue");
        return execution.execute(request, body);
    };
    template.setInterceptors(interceptor);
    HttpHeaders requestHeaders = HttpHeaders.create();
    mockSentRequest(POST, "https://example.com", requestHeaders);
    mockResponseStatus(HttpStatus.OK);
    HttpHeaders entityHeaders = HttpHeaders.create();
    entityHeaders.add("MyHeader", "MyEntityValue");
    HttpEntity<Void> entity = new HttpEntity<>(null, entityHeaders);
    template.exchange("https://example.com", POST, entity, Void.class);
    assertThat(requestHeaders.get("MyHeader")).contains("MyEntityValue", "MyInterceptorValue");
    verify(response).close();
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) MediaType.parseMediaType(cn.taketoday.http.MediaType.parseMediaType) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) HttpMessageConverter(cn.taketoday.http.converter.HttpMessageConverter) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) PUT(cn.taketoday.http.HttpMethod.PUT) DELETE(cn.taketoday.http.HttpMethod.DELETE) HttpHeaders(cn.taketoday.http.HttpHeaders) GenericHttpMessageConverter(cn.taketoday.http.converter.GenericHttpMessageConverter) ByteArrayInputStream(java.io.ByteArrayInputStream) BDDMockito.given(org.mockito.BDDMockito.given) Map(java.util.Map) MockWebServer(okhttp3.mockwebserver.MockWebServer) DefaultUriBuilderFactory(cn.taketoday.web.util.DefaultUriBuilderFactory) ClientHttpRequestInitializer(cn.taketoday.http.client.ClientHttpRequestInitializer) URI(java.net.URI) PATCH(cn.taketoday.http.HttpMethod.PATCH) EnumSet(java.util.EnumSet) BDDMockito.willThrow(org.mockito.BDDMockito.willThrow) RecordedRequest(okhttp3.mockwebserver.RecordedRequest) OPTIONS(cn.taketoday.http.HttpMethod.OPTIONS) Set(java.util.Set) ResponseEntity(cn.taketoday.http.ResponseEntity) ClientHttpResponse(cn.taketoday.http.client.ClientHttpResponse) StreamUtils(cn.taketoday.util.StreamUtils) Collectors(java.util.stream.Collectors) Test(org.junit.jupiter.api.Test) List(java.util.List) POST(cn.taketoday.http.HttpMethod.POST) GET(cn.taketoday.http.HttpMethod.GET) Entry(java.util.Map.Entry) HttpStatus(cn.taketoday.http.HttpStatus) MockResponse(okhttp3.mockwebserver.MockResponse) ClientHttpRequestInterceptor(cn.taketoday.http.client.ClientHttpRequestInterceptor) Mockito.mock(org.mockito.Mockito.mock) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) HashMap(java.util.HashMap) HttpMethod(cn.taketoday.http.HttpMethod) Assertions.assertThatExceptionOfType(org.assertj.core.api.Assertions.assertThatExceptionOfType) TypeReference(cn.taketoday.core.TypeReference) ClientHttpRequestFactory(cn.taketoday.http.client.ClientHttpRequestFactory) ClientHttpRequest(cn.taketoday.http.client.ClientHttpRequest) IOException(java.io.IOException) SimpleClientHttpRequestFactory(cn.taketoday.http.client.SimpleClientHttpRequestFactory) HttpInputMessage(cn.taketoday.http.HttpInputMessage) Mockito.verify(org.mockito.Mockito.verify) HEAD(cn.taketoday.http.HttpMethod.HEAD) Assertions.assertThatIllegalArgumentException(org.assertj.core.api.Assertions.assertThatIllegalArgumentException) HttpEntity(cn.taketoday.http.HttpEntity) MediaType(cn.taketoday.http.MediaType) Collections(java.util.Collections) HttpHeaders(cn.taketoday.http.HttpHeaders) HttpEntity(cn.taketoday.http.HttpEntity) ClientHttpRequestInterceptor(cn.taketoday.http.client.ClientHttpRequestInterceptor) Test(org.junit.jupiter.api.Test)

Example 5 with ClientHttpRequestInterceptor

use of cn.taketoday.http.client.ClientHttpRequestInterceptor in project today-framework by TAKETODAY.

the class RestTemplateTests method clientHttpRequestInitializerAndRequestInterceptorAreBothApplied.

@Test
void clientHttpRequestInitializerAndRequestInterceptorAreBothApplied() throws Exception {
    ClientHttpRequestInitializer initializer = request -> request.getHeaders().add("MyHeader", "MyInitializerValue");
    ClientHttpRequestInterceptor interceptor = (request, body, execution) -> {
        request.getHeaders().add("MyHeader", "MyInterceptorValue");
        return execution.execute(request, body);
    };
    template.setHttpRequestInitializers(Collections.singletonList(initializer));
    template.setInterceptors(interceptor);
    MediaType contentType = MediaType.TEXT_PLAIN;
    given(converter.canWrite(String.class, contentType)).willReturn(true);
    HttpHeaders requestHeaders = HttpHeaders.create();
    mockSentRequest(POST, "https://example.com", requestHeaders);
    mockResponseStatus(HttpStatus.OK);
    HttpHeaders entityHeaders = HttpHeaders.create();
    entityHeaders.setContentType(contentType);
    HttpEntity<String> entity = new HttpEntity<>("Hello World", entityHeaders);
    template.exchange("https://example.com", POST, entity, Void.class);
    assertThat(requestHeaders.get("MyHeader")).contains("MyInterceptorValue", "MyInitializerValue");
    verify(response).close();
}
Also used : ClientHttpRequestInitializer(cn.taketoday.http.client.ClientHttpRequestInitializer) BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) MediaType.parseMediaType(cn.taketoday.http.MediaType.parseMediaType) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) HttpMessageConverter(cn.taketoday.http.converter.HttpMessageConverter) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) PUT(cn.taketoday.http.HttpMethod.PUT) DELETE(cn.taketoday.http.HttpMethod.DELETE) HttpHeaders(cn.taketoday.http.HttpHeaders) GenericHttpMessageConverter(cn.taketoday.http.converter.GenericHttpMessageConverter) ByteArrayInputStream(java.io.ByteArrayInputStream) BDDMockito.given(org.mockito.BDDMockito.given) Map(java.util.Map) MockWebServer(okhttp3.mockwebserver.MockWebServer) DefaultUriBuilderFactory(cn.taketoday.web.util.DefaultUriBuilderFactory) ClientHttpRequestInitializer(cn.taketoday.http.client.ClientHttpRequestInitializer) URI(java.net.URI) PATCH(cn.taketoday.http.HttpMethod.PATCH) EnumSet(java.util.EnumSet) BDDMockito.willThrow(org.mockito.BDDMockito.willThrow) RecordedRequest(okhttp3.mockwebserver.RecordedRequest) OPTIONS(cn.taketoday.http.HttpMethod.OPTIONS) Set(java.util.Set) ResponseEntity(cn.taketoday.http.ResponseEntity) ClientHttpResponse(cn.taketoday.http.client.ClientHttpResponse) StreamUtils(cn.taketoday.util.StreamUtils) Collectors(java.util.stream.Collectors) Test(org.junit.jupiter.api.Test) List(java.util.List) POST(cn.taketoday.http.HttpMethod.POST) GET(cn.taketoday.http.HttpMethod.GET) Entry(java.util.Map.Entry) HttpStatus(cn.taketoday.http.HttpStatus) MockResponse(okhttp3.mockwebserver.MockResponse) ClientHttpRequestInterceptor(cn.taketoday.http.client.ClientHttpRequestInterceptor) Mockito.mock(org.mockito.Mockito.mock) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) HashMap(java.util.HashMap) HttpMethod(cn.taketoday.http.HttpMethod) Assertions.assertThatExceptionOfType(org.assertj.core.api.Assertions.assertThatExceptionOfType) TypeReference(cn.taketoday.core.TypeReference) ClientHttpRequestFactory(cn.taketoday.http.client.ClientHttpRequestFactory) ClientHttpRequest(cn.taketoday.http.client.ClientHttpRequest) IOException(java.io.IOException) SimpleClientHttpRequestFactory(cn.taketoday.http.client.SimpleClientHttpRequestFactory) HttpInputMessage(cn.taketoday.http.HttpInputMessage) Mockito.verify(org.mockito.Mockito.verify) HEAD(cn.taketoday.http.HttpMethod.HEAD) Assertions.assertThatIllegalArgumentException(org.assertj.core.api.Assertions.assertThatIllegalArgumentException) HttpEntity(cn.taketoday.http.HttpEntity) MediaType(cn.taketoday.http.MediaType) Collections(java.util.Collections) HttpHeaders(cn.taketoday.http.HttpHeaders) HttpEntity(cn.taketoday.http.HttpEntity) MediaType.parseMediaType(cn.taketoday.http.MediaType.parseMediaType) MediaType(cn.taketoday.http.MediaType) ClientHttpRequestInterceptor(cn.taketoday.http.client.ClientHttpRequestInterceptor) Test(org.junit.jupiter.api.Test)

Aggregations

ClientHttpRequestInterceptor (cn.taketoday.http.client.ClientHttpRequestInterceptor)8 TypeReference (cn.taketoday.core.TypeReference)6 HttpEntity (cn.taketoday.http.HttpEntity)6 HttpHeaders (cn.taketoday.http.HttpHeaders)6 HttpInputMessage (cn.taketoday.http.HttpInputMessage)6 HttpMethod (cn.taketoday.http.HttpMethod)6 DELETE (cn.taketoday.http.HttpMethod.DELETE)6 GET (cn.taketoday.http.HttpMethod.GET)6 HEAD (cn.taketoday.http.HttpMethod.HEAD)6 OPTIONS (cn.taketoday.http.HttpMethod.OPTIONS)6 PATCH (cn.taketoday.http.HttpMethod.PATCH)6 POST (cn.taketoday.http.HttpMethod.POST)6 PUT (cn.taketoday.http.HttpMethod.PUT)6 HttpStatus (cn.taketoday.http.HttpStatus)6 MediaType (cn.taketoday.http.MediaType)6 MediaType.parseMediaType (cn.taketoday.http.MediaType.parseMediaType)6 ResponseEntity (cn.taketoday.http.ResponseEntity)6 ClientHttpRequest (cn.taketoday.http.client.ClientHttpRequest)6 ClientHttpRequestFactory (cn.taketoday.http.client.ClientHttpRequestFactory)6 ClientHttpRequestInitializer (cn.taketoday.http.client.ClientHttpRequestInitializer)6