Index
All Classes and Interfaces|All Packages|Serialized Form
A
- addBinaryBody(String, byte[]) - Method in class me.geso.mech2.Mech2RequestMultipart
-
Add binary body from byte array.
- addBinaryBody(String, File) - Method in class me.geso.mech2.Mech2RequestMultipart
-
Add binary body from the file.
- addBinaryBody(String, File, ContentType, String) - Method in class me.geso.mech2.Mech2RequestMultipart
-
Add binary body from the file using specific content-type.
- addHeader(String, String) - Method in class me.geso.mech2.Mech2Request
-
Add header to the request.
- addParameter(String, String) - Method in class me.geso.mech2.Mech2Request
-
Deprecated.
- addQueryParameter(String, String) - Method in class me.geso.mech2.Mech2Request
-
Add query parameter to the URI
- addTextBody(String, String) - Method in class me.geso.mech2.Mech2RequestMultipart
-
Add text body
B
- build() - Method in class me.geso.mech2.Mech2.Builder
- builder() - Static method in class me.geso.mech2.Mech2
-
Get the builder object.
D
- delete(URI) - Method in class me.geso.mech2.Mech2
-
Create new DELETE request object.
- disableRedirectHandling() - Method in class me.geso.mech2.Mech2
-
Disable redirect handling.
- disableRedirectHandling() - Method in class me.geso.mech2.Mech2WithBase
-
Disable redirect handling.
E
- execute() - Method in class me.geso.mech2.Mech2Request
-
Execute request.
- execute() - Method in class me.geso.mech2.Mech2RequestMultipart
-
Execute HTTP request.
G
- get(String) - Method in class me.geso.mech2.Mech2WithBase
-
Create new GET request.
- get(URI) - Method in class me.geso.mech2.Mech2
-
Create new GET request object.
- getBaseURI() - Method in class me.geso.mech2.Mech2WithBase
-
Get base URI
- getContentType() - Method in class me.geso.mech2.Mech2Result
-
Get ContentType object from the response.
- getf(String, Object...) - Method in class me.geso.mech2.Mech2WithBase
-
Create new GET request using
String.format(String, Object...). - getHttpClientBuilder() - Method in class me.geso.mech2.Mech2
-
Get the current HttpClientBuilder object.
You can set parameter for this object. - getMech2() - Method in class me.geso.mech2.Mech2WithBase
-
Get a mech2 instance.
- getObjectMapper() - Method in class me.geso.mech2.Mech2
-
Get the jackson's ObjectMapper object.
You can configure the parameters. - getRequest() - Method in class me.geso.mech2.Mech2Result
-
Get HttpRequest object.
- getResponse() - Method in class me.geso.mech2.Mech2Result
-
Get HttpResponse object.
- getResponseBodyAsByteArray() - Method in class me.geso.mech2.Mech2Result
-
Get the HTTP response as byte array.
- getResponseBodyAsString() - Method in class me.geso.mech2.Mech2Result
-
Get the HTTP response as String.
- getResult() - Method in class me.geso.mech2.Mech2JSONResult
-
Get Mech2Result instance.
- getStatusCode() - Method in class me.geso.mech2.Mech2Result
-
Shorthand for
mech.getResponse().getStatusLine().getStatusCode()
H
I
- isJSONResponse() - Method in class me.geso.mech2.Mech2Result
-
Returns true if Content-Type of response is "application/json".
- isSuccess() - Method in class me.geso.mech2.Mech2JSONResult
- isSuccess() - Method in class me.geso.mech2.Mech2Result
-
Returns true if the HttResponse has 2xx status code.
M
- me.geso.mech2 - package me.geso.mech2
- Mech2 - Class in me.geso.mech2
-
Main class of the mech2 package.
- Mech2.Builder - Class in me.geso.mech2
- Mech2FailException - Exception Class in me.geso.mech2
-
Exception class for
orDie()method. - Mech2FailException(Mech2Result) - Constructor for exception class me.geso.mech2.Mech2FailException
- Mech2JSONResult<T> - Class in me.geso.mech2
-
This class contains
Mech2Resultand JSON type information. - Mech2JSONResult.Mech2JSONResultClass<T> - Class in me.geso.mech2
- Mech2JSONResult.Mech2JSONResultTypeReference<T> - Class in me.geso.mech2
- Mech2JSONResultClass(Mech2Result, Class<T>) - Constructor for class me.geso.mech2.Mech2JSONResult.Mech2JSONResultClass
- Mech2JSONResultTypeReference(Mech2Result, TypeReference<T>) - Constructor for class me.geso.mech2.Mech2JSONResult.Mech2JSONResultTypeReference
- Mech2Request - Class in me.geso.mech2
-
The class represents HttpRequest.
- Mech2Request(Mech2, URIBuilder, HttpRequestBase) - Constructor for class me.geso.mech2.Mech2Request
-
Normally, you shouldn't call this directly.
- Mech2RequestMultipart - Class in me.geso.mech2
-
This is a HTTP request class, has a
multipart/form-datacontent-type. - Mech2RequestMultipart(Mech2, URIBuilder, HttpRequestBase, Charset) - Constructor for class me.geso.mech2.Mech2RequestMultipart
-
Do not use this directly.
- Mech2Result - Class in me.geso.mech2
-
HTTP request result.
- Mech2WithBase - Class in me.geso.mech2
-
Mech2 object with base URI.
- Mech2WithBase(Mech2, URI) - Constructor for class me.geso.mech2.Mech2WithBase
O
- of(Mech2Result, TypeReference<T>) - Static method in class me.geso.mech2.Mech2JSONResult
-
Create new instance.
- of(Mech2Result, Class<T>) - Static method in class me.geso.mech2.Mech2JSONResult
-
Create new instance.
- orDie() - Method in class me.geso.mech2.Mech2JSONResult
-
Throw exception if the response doesn't contain 2XX.
- orDie() - Method in class me.geso.mech2.Mech2Result
-
throw exception if the response doesn't have 2xx response.
P
- parseJSON() - Method in class me.geso.mech2.Mech2JSONResult.Mech2JSONResultClass
- parseJSON() - Method in class me.geso.mech2.Mech2JSONResult.Mech2JSONResultTypeReference
- parseJSON() - Method in class me.geso.mech2.Mech2JSONResult
-
Parse JSON as object.
- parseJSON(TypeReference<T>) - Method in class me.geso.mech2.Mech2Result
-
Parse JSON from content-body using jackson.
- parseJSON(Class<T>) - Method in class me.geso.mech2.Mech2Result
-
Parse JSON from content-body using jackson.
- post(String) - Method in class me.geso.mech2.Mech2WithBase
-
Create new POST request.
- post(URI) - Method in class me.geso.mech2.Mech2
-
Create new POST request object.
- postJSON(String, Object) - Method in class me.geso.mech2.Mech2WithBase
-
Create new POST request contains JSON.
- postMultipart(String) - Method in class me.geso.mech2.Mech2WithBase
-
Create multi-part POST request(Charset is UTF-8).
- postMultipart(String, Charset) - Method in class me.geso.mech2.Mech2WithBase
-
Create new multi-part POST request.
- put(URI) - Method in class me.geso.mech2.Mech2
-
Create new PUT request object.
R
- request(HttpUriRequest) - Method in class me.geso.mech2.Mech2
-
Send HTTP request by HttpUriRequest.
S
- setBody(HttpEntity) - Method in class me.geso.mech2.Mech2Request
-
Set HttpEntity object to the request.
- setBodyJSON(Object) - Method in class me.geso.mech2.Mech2Request
-
Set JSON value as the entity body.
This method uses jackson for serializing. - setHeader(String, String) - Method in class me.geso.mech2.Mech2Request
-
Set header to the request.
- setHttpClientBuilder(HttpClientBuilder) - Method in class me.geso.mech2.Mech2.Builder
- setObjectMapper(ObjectMapper) - Method in class me.geso.mech2.Mech2.Builder
- setQueryParameter(String, String) - Method in class me.geso.mech2.Mech2Request
-
Set query parameter to the URI
- setUserAgent(String) - Method in class me.geso.mech2.Mech2.Builder
T
- toJSONResult(TypeReference<T>) - Method in class me.geso.mech2.Mech2Result
-
Convert the result to Mech2JSONResult object.
- toJSONResult(Class<T>) - Method in class me.geso.mech2.Mech2Result
-
Convert the result to Mech2JSONResult object.
All Classes and Interfaces|All Packages|Serialized Form