Class DefaultHttpService
- java.lang.Object
-
- com.github.davidmoten.odata.client.internal.DefaultHttpService
-
- All Implemented Interfaces:
HttpService,AutoCloseable
public final class DefaultHttpService extends Object implements HttpService
-
-
Field Summary
-
Fields inherited from interface com.github.davidmoten.odata.client.HttpService
LENGTH_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description DefaultHttpService(Path basePath, Function<List<RequestHeader>,List<RequestHeader>> requestHeadersModifier, Consumer<HttpURLConnection> consumer)
-
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)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
-
DefaultHttpService
public DefaultHttpService(Path basePath, Function<List<RequestHeader>,List<RequestHeader>> requestHeadersModifier, Consumer<HttpURLConnection> consumer)
-
-
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
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
getStream
public InputStream getStream(HttpMethod method, String url, List<RequestHeader> requestHeaders, HttpRequestOptions options)
- Specified by:
getStreamin interfaceHttpService
-
-