Package io.odilon.client.http.multipart
Class HttpRequest
- java.lang.Object
-
- io.odilon.client.http.multipart.HttpRequest
-
- Direct Known Subclasses:
HttpMultipart
public class HttpRequest extends Object
-
-
Constructor Summary
Constructors Constructor Description HttpRequest(String url, String credentials)
HttpRequest(String url, String credentials, ProgressListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
close()
<T> T
exchange(HttpEntity requestEntity, com.fasterxml.jackson.core.type.TypeReference<T> responseType)
String
getApiToken()
int
getChunk()
HttpURLConnection
getConnection()
protected String
getContentType()
String
getCredentials()
protected boolean
getDoOutput()
BufferedReader
getErrorReader()
protected String
getErrorResponse()
ProgressListener
getListener()
BufferedReader
getReader()
protected String
getRequestMethod()
protected String
getResponse()
int
getResponseCode()
URL
getUrl()
PrintWriter
getWriter()
protected HttpURLConnection
openConnection()
void
setApiToken(String apiToken)
void
setChunk(int chunk)
void
setConnection(HttpURLConnection connection)
void
setCredentials(String credentials)
void
setListener(ProgressListener listener)
void
setUrl(String url)
protected void
write(HttpEntity entity)
-
-
-
Field Detail
-
LINE_FEED
protected String LINE_FEED
-
-
Constructor Detail
-
HttpRequest
public HttpRequest(String url, String credentials, ProgressListener listener)
-
-
Method Detail
-
getListener
public ProgressListener getListener()
-
setListener
public void setListener(ProgressListener listener)
-
getChunk
public int getChunk()
-
setChunk
public void setChunk(int chunk)
-
exchange
public <T> T exchange(HttpEntity requestEntity, com.fasterxml.jackson.core.type.TypeReference<T> responseType) throws ODClientException
- Throws:
ODClientException
-
getWriter
public PrintWriter getWriter() throws IOException
- Throws:
IOException
-
getReader
public BufferedReader getReader() throws IOException
- Throws:
IOException
-
getErrorReader
public BufferedReader getErrorReader() throws IOException
- Throws:
IOException
-
getResponseCode
public int getResponseCode() throws IOException
- Throws:
IOException
-
getConnection
public HttpURLConnection getConnection() throws IOException
- Throws:
IOException
-
setUrl
public void setUrl(String url)
-
setCredentials
public void setCredentials(String credentials)
-
getUrl
public URL getUrl() throws MalformedURLException
- Throws:
MalformedURLException
-
getCredentials
public String getCredentials()
-
getApiToken
public String getApiToken()
-
setApiToken
public void setApiToken(String apiToken)
-
setConnection
public void setConnection(HttpURLConnection connection)
-
write
protected void write(HttpEntity entity) throws IOException
- Throws:
IOException
-
getResponse
protected String getResponse() throws IOException
- Throws:
IOException
-
getErrorResponse
protected String getErrorResponse() throws IOException
- Throws:
IOException
-
getRequestMethod
protected String getRequestMethod()
-
getContentType
protected String getContentType()
-
getDoOutput
protected boolean getDoOutput()
-
openConnection
protected HttpURLConnection openConnection() throws IOException
- Throws:
IOException
-
close
protected void close()
-
-