Package com.mendix.http
Interface Http
public interface Http
Provides the interface to HTTP requests.
-
Method Summary
Modifier and TypeMethodDescriptionexecuteHttpRequest
(URI uri, HttpMethod method, HttpHeader[] headers, InputStream content) Executes an HTTP request.void
registerHttpRequestInterceptor
(String host, IHttpRequestInterceptor httpRequestInterceptor) Register an interceptor for an HTTP request directed to a specified target host.
-
Method Details
-
registerHttpRequestInterceptor
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(URI uri, HttpMethod method, HttpHeader[] headers, 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
-