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()HttpResponsedelete(String url, List<RequestHeader> requestHeaders, HttpRequestOptions options)HttpResponseget(String url, List<RequestHeader> requestHeaders, HttpRequestOptions options)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)HttpResponsepatch(String url, List<RequestHeader> requestHeaders, InputStream content, int length, HttpRequestOptions options)HttpResponsepost(String url, List<RequestHeader> requestHeaders, InputStream content, int length, HttpRequestOptions options)HttpResponseput(String url, List<RequestHeader> requestHeaders, InputStream content, int length, HttpRequestOptions options)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.davidmoten.odata.client.HttpService
get, getBytes, getBytes, getProxy, getStream, getStream, getStringUtf8, getStringUtf8, patch, post, put, send, submitWithContent, submitWithContent
-
-
-
-
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
-
get
public HttpResponse get(String url, List<RequestHeader> requestHeaders, HttpRequestOptions options)
- Specified by:
getin interfaceHttpService
-
patch
public HttpResponse patch(String url, List<RequestHeader> requestHeaders, InputStream content, int length, HttpRequestOptions options)
- Specified by:
patchin interfaceHttpService
-
put
public HttpResponse put(String url, List<RequestHeader> requestHeaders, InputStream content, int length, HttpRequestOptions options)
- Specified by:
putin interfaceHttpService
-
post
public HttpResponse post(String url, List<RequestHeader> requestHeaders, InputStream content, int length, HttpRequestOptions options)
- Specified by:
postin interfaceHttpService
-
delete
public HttpResponse delete(String url, List<RequestHeader> requestHeaders, HttpRequestOptions options)
- Specified by:
deletein 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
-
-