Package com.mendix.http
Interface Http
-
public interface Http
Provides the interface to HTTP requests.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HttpResponse
executeHttpRequest(java.net.URI uri, HttpMethod method, HttpHeader[] headers, java.io.InputStream content)
Executes an HTTP request.void
registerHttpRequestInterceptor(java.lang.String host, IHttpRequestInterceptor httpRequestInterceptor)
Register an interceptor for an HTTP request directed to a specified target host.
-
-
-
Method Detail
-
registerHttpRequestInterceptor
void registerHttpRequestInterceptor(java.lang.String host, IHttpRequestInterceptor httpRequestInterceptor)
Register an interceptor for an HTTP request directed to a specified target host.- Parameters:
host
- the host. It can contain wildcard (e.g. *.mendix.com)httpRequestInterceptor
- the interceptor to capture the HTTP request before it is sent to the server
-
executeHttpRequest
HttpResponse executeHttpRequest(java.net.URI uri, HttpMethod method, HttpHeader[] headers, java.io.InputStream content)
Executes an HTTP request. Consumers should call HttpResponse.close() when the content of the response has been consumed.- Parameters:
uri
- the uri to contactmethod
- the HTTP methodheaders
- the headers of the requestcontent
- the content of the request, or null when there is no content. For methods GET and DELETE this value is ignored- Returns:
- the resulting response
-
-