Interface Http

public interface Http
  • Method Details

    • registerHttpRequestInterceptor

      void registerHttpRequestInterceptor(String host, IHttpRequestInterceptor httpRequestInterceptor)
      Register an interceptor for an HTTP request directed to a specified target host.
      host - the host. It can contain wildcard (e.g. *
      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.
      uri - the uri to contact.
      method - the HTTP method.
      headers - the headers of the request.
      content - the content of the request, or null when there is no content. For methods GET and DELETE this value is ignored.
      the resulting response.