Class HttpRequestImpl.Builder
java.lang.Object
org.wikirate4j.utils.HttpRequestImpl.Builder
- Enclosing class:
HttpRequestImpl
Builder for new instances of
HttpRequest- Author:
- Vasiliki Gkatziaki
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddParameter(String name, String value) GET()Builds and executes a GET http request and returns a new instance ofHttpRequestparameters(HashMap<String, String> parms) POST()Builds and executes a POST http request and returns a new instance ofHttpRequest
-
Constructor Details
-
Builder
-
-
Method Details
-
endpoint
-
addHeader
-
addParameter
-
filters
-
parameters
-
auth
-
GET
public HttpRequest GET() throws IOException, URISyntaxException, HTTPException, org.apache.hc.core5.http.ParseExceptionBuilds and executes a GET http request and returns a new instance ofHttpRequest- Returns:
- Throws:
IOExceptionURISyntaxExceptionorg.apache.hc.core5.http.ParseExceptionHTTPException
-
POST
public HttpRequest POST() throws IOException, URISyntaxException, HTTPException, org.apache.hc.core5.http.ParseExceptionBuilds and executes a POST http request and returns a new instance ofHttpRequest- Returns:
- Throws:
IOExceptionURISyntaxExceptionorg.apache.hc.core5.http.ParseExceptionHTTPException
-