Interface HttpPoster


  • public interface HttpPoster
    In order to provide your own implementation of an HTTP client, an implementation of this interface must be provided.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      HttpResponse post​(java.net.URL url, java.util.Map<java.lang.String,​java.lang.String> headers, byte[] body, java.lang.String mediaType)
      Post data to the provided URL.
    • Method Detail

      • post

        HttpResponse post​(java.net.URL url,
                          java.util.Map<java.lang.String,​java.lang.String> headers,
                          byte[] body,
                          java.lang.String mediaType)
                   throws java.io.IOException
        Post data to the provided URL.
        Parameters:
        url - http url to be reached
        headers - headers to be sent
        body - body to be sent
        mediaType - media type definition
        Returns:
        http response from the POST request
        Throws:
        java.io.IOException - in case of http request error