public final class HttpMethods extends Object
Constructor and Description |
---|
HttpMethods(io.toro.martini.gloop.http.GloopHttpRequestFactory requestFactory,
io.toro.martini.gloop.http.GloopResponseHandlerFactory responseHandlerFactory,
io.toro.martini.gloop.http.GloopHttpContextFactory httpClientContextFactory,
Supplier<org.apache.http.impl.client.HttpClientBuilder> httpClientBuilder) |
Modifier and Type | Method and Description |
---|---|
static io.toro.gloop.object.property.GloopModel |
http(io.toro.gloop.object.property.GloopModel requestModel,
io.toro.gloop.object.property.GloopModel authModel,
String returnAs,
String responseType,
boolean throwHttpExceptions,
io.toro.gloop.object.property.GloopModel trackableModel,
io.toro.gloop.engine.GloopExecutionContext context)
Send an HTTP request, and parse the response into a model.
|
static io.toro.gloop.object.property.GloopModel |
soap(String url,
io.toro.gloop.object.property.GloopModel authModel,
String soapAction,
String style,
String soapProtocol,
io.toro.gloop.object.property.GloopModel messageHeader,
io.toro.gloop.object.property.GloopModel messageBody,
io.toro.gloop.object.property.GloopModel trackable,
io.toro.gloop.engine.GloopExecutionContext context)
Send a SOAP request, and parse the response into a model.
|
public HttpMethods(io.toro.martini.gloop.http.GloopHttpRequestFactory requestFactory, io.toro.martini.gloop.http.GloopResponseHandlerFactory responseHandlerFactory, io.toro.martini.gloop.http.GloopHttpContextFactory httpClientContextFactory, Supplier<org.apache.http.impl.client.HttpClientBuilder> httpClientBuilder)
@GloopObjectParameter(value="output{\nresponse#io.toro.martini.http.Response{\n}\n}") public static io.toro.gloop.object.property.GloopModel http(@GloopObjectParameter(value="request#io.toro.martini.http.Request{\n}") io.toro.gloop.object.property.GloopModel requestModel, @GloopObjectParameter(value="auth#io.toro.martini.http.Auth{\n}") io.toro.gloop.object.property.GloopModel authModel, @GloopParameter(choices={"InputStream","String","byte[]","GloopObject"},defaultValue="String") String returnAs, @GloopParameter(choices={"Xml","Json","Auto Detect"},defaultValue="Auto Detect") String responseType, @GloopParameter(defaultValue="false") boolean throwHttpExceptions, @GloopObjectParameter(value="trackable#io.toro.martini.tracker.Trackable{\n}") io.toro.gloop.object.property.GloopModel trackableModel, io.toro.gloop.engine.GloopExecutionContext context) throws IOException
requestModel
- describes the HTTP request to sendauthModel
- authentication model to be used for the requestreturnAs
- determines the desired data type for the response contentresponseType
- determines the content type of the server's responsethrowHttpExceptions
- determines whether or not exceptions should be thrown
when the server receives a response code >= 500.trackableModel
- tracking metadata to be used by Martini's Tracker enginecontext
- the Gloop execution context (automatically mapped by Gloop)IOException
@GloopObjectParameter(value="output{\nresponse#io.toro.martini.http.Response{\n}\n}") public static io.toro.gloop.object.property.GloopModel soap(String url, @GloopObjectParameter(value="auth#io.toro.martini.http.Auth{\n}") io.toro.gloop.object.property.GloopModel authModel, String soapAction, @GloopParameter(defaultValue="false") String style, @GloopParameter(defaultValue="false") String soapProtocol, io.toro.gloop.object.property.GloopModel messageHeader, io.toro.gloop.object.property.GloopModel messageBody, @GloopObjectParameter(value="trackable#io.toro.martini.tracker.Trackable{\n}") io.toro.gloop.object.property.GloopModel trackable, io.toro.gloop.engine.GloopExecutionContext context) throws Exception
url
- the URL of the recipient SOAP endpointauthModel
- authentication model to be used for the requestsoapAction
- the SOAP action to usestyle
- determines whether or not to use an RPC style model; set to true
to use RPC stylesoapProtocol
- determines whether or not the service is implemented in SOAP v1.2;
set to true
to use SOAP v1.2messageHeader
- the message header to be sent along with the requestmessageBody
- the message body to be sent along with the requesttrackable
- tracking metadata to be used by Martini's Tracker enginecontext
- the Gloop execution context (automatically mapped by Gloop)Exception
Copyright © 2019. All rights reserved.