Package com.c8db.internal.http
Class HttpConnection
- java.lang.Object
-
- com.c8db.internal.http.HttpConnection
-
- All Implemented Interfaces:
Connection,Closeable,AutoCloseable
public class HttpConnection extends Object implements Connection
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpConnection.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.http.auth.CredentialsaddCredentials(org.apache.http.client.methods.HttpRequestBase httpRequest)ResponsebuildResponse(org.apache.http.client.methods.CloseableHttpResponse httpResponse)protected voidcheckError(Response response)voidclose()Responseexecute(Request request)voidsetJwt(String jwt)
-
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
execute
public Response execute(Request request) throws C8DBException, IOException
- Throws:
C8DBExceptionIOException
-
addCredentials
public org.apache.http.auth.Credentials addCredentials(org.apache.http.client.methods.HttpRequestBase httpRequest)
-
buildResponse
public Response buildResponse(org.apache.http.client.methods.CloseableHttpResponse httpResponse) throws UnsupportedOperationException, IOException
-
checkError
protected void checkError(Response response) throws C8DBException
- Throws:
C8DBException
-
setJwt
public void setJwt(String jwt)
-
-