Class ApacheHttpClientHttpService
- java.lang.Object
-
- com.github.davidmoten.odata.client.internal.ApacheHttpClientHttpService
-
- All Implemented Interfaces:
HttpService,AutoCloseable
public class ApacheHttpClientHttpService extends Object implements HttpService
-
-
Field Summary
-
Fields inherited from interface com.github.davidmoten.odata.client.HttpService
LENGTH_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description ApacheHttpClientHttpService(Path basePath)ApacheHttpClientHttpService(Path basePath, Supplier<org.apache.http.impl.client.CloseableHttpClient> clientSupplier, BiFunction<URL,List<RequestHeader>,List<RequestHeader>> requestHeadersModifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()PathgetBasePath()InputStreamgetStream(HttpMethod method, String url, List<RequestHeader> requestHeaders, HttpRequestOptions options)InputStreamgetStream(List<RequestHeader> requestHeaders, org.apache.http.client.methods.HttpRequestBase request, InputStream content, int length, HttpRequestOptions options)HttpResponsesubmit(HttpMethod method, String url, List<RequestHeader> requestHeaders, InputStream content, int length, HttpRequestOptions options)
-
-
-
Constructor Detail
-
ApacheHttpClientHttpService
public ApacheHttpClientHttpService(Path basePath, Supplier<org.apache.http.impl.client.CloseableHttpClient> clientSupplier, BiFunction<URL,List<RequestHeader>,List<RequestHeader>> requestHeadersModifier)
-
ApacheHttpClientHttpService
public ApacheHttpClientHttpService(Path basePath)
-
-
Method Detail
-
submit
public HttpResponse submit(HttpMethod method, String url, List<RequestHeader> requestHeaders, InputStream content, int length, HttpRequestOptions options)
- Specified by:
submitin interfaceHttpService
-
getBasePath
public Path getBasePath()
- Specified by:
getBasePathin interfaceHttpService
-
getStream
public InputStream getStream(HttpMethod method, String url, List<RequestHeader> requestHeaders, HttpRequestOptions options)
- Specified by:
getStreamin interfaceHttpService
-
getStream
public InputStream getStream(List<RequestHeader> requestHeaders, org.apache.http.client.methods.HttpRequestBase request, InputStream content, int length, HttpRequestOptions options)
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-