Class HttpUrlConnectionCall


@Deprecated public class HttpUrlConnectionCall extends ClientCall
Deprecated.
Will be removed in the next 2.7/3.0 release.
HTTP client connector call based on JDK's java.net.HttpURLConnection class.
Author:
Jerome Louvel
  • Constructor Details

    • HttpUrlConnectionCall

      public HttpUrlConnectionCall(HttpClientHelper helper, String method, String requestUri, boolean hasEntity) throws IOException
      Deprecated.
      Constructor.
      Parameters:
      helper - The parent HTTP client helper.
      method - The method name.
      requestUri - The request URI.
      hasEntity - Indicates if the call has an entity to send to the server.
      Throws:
      IOException
  • Method Details

    • getConnection

      public HttpURLConnection getConnection()
      Deprecated.
      Returns the connection.
      Returns:
      The connection.
    • getHelper

      public HttpClientHelper getHelper()
      Deprecated.
      Returns the HTTP client helper.
      Overrides:
      getHelper in class ClientCall
      Returns:
      The HTTP client helper.
    • getReasonPhrase

      public String getReasonPhrase()
      Deprecated.
      Returns the response reason phrase.
      Overrides:
      getReasonPhrase in class Call
      Returns:
      The response reason phrase.
    • getRepresentation

      protected Representation getRepresentation(InputStream stream)
      Deprecated.
      Description copied from class: Call
      Returns the representation wrapping the given stream.
      Overrides:
      getRepresentation in class Call
      Parameters:
      stream - The response input stream.
      Returns:
      The wrapping representation.
    • getRequestEntityStream

      public OutputStream getRequestEntityStream()
      Deprecated.
      Description copied from class: ClientCall
      Returns the request entity stream if it exists.
      Specified by:
      getRequestEntityStream in class ClientCall
      Returns:
      The request entity stream if it exists.
    • getRequestHeadStream

      public OutputStream getRequestHeadStream()
      Deprecated.
      Description copied from class: ClientCall
      Returns the request head stream if it exists.
      Specified by:
      getRequestHeadStream in class ClientCall
      Returns:
      The request head stream if it exists.
    • getRequestStream

      public OutputStream getRequestStream()
      Deprecated.
      Returns the request entity stream if it exists.
      Returns:
      The request entity stream if it exists.
    • getResponseEntityStream

      public InputStream getResponseEntityStream(long size)
      Deprecated.
      Description copied from class: ClientCall
      Returns the response entity stream if it exists.
      Specified by:
      getResponseEntityStream in class ClientCall
      Parameters:
      size - The expected entity size or -1 if unknown.
      Returns:
      The response entity stream if it exists.
    • getResponseHeaders

      public Series<Header> getResponseHeaders()
      Deprecated.
      Returns the modifiable list of response headers.
      Overrides:
      getResponseHeaders in class Call
      Returns:
      The modifiable list of response headers.
    • getServerAddress

      public String getServerAddress()
      Deprecated.
      Returns the response address.
      Corresponds to the IP address of the responding server.
      Overrides:
      getServerAddress in class Call
      Returns:
      The response address.
    • getStatusCode

      public int getStatusCode() throws IOException
      Deprecated.
      Returns the response status code.
      Overrides:
      getStatusCode in class Call
      Returns:
      The response status code.
      Throws:
      IOException
      IOException
    • sendRequest

      public Status sendRequest(Request request)
      Deprecated.
      Sends the request to the client. Commits the request line, headers, and optional entity and send them over the network.
      Overrides:
      sendRequest in class ClientCall
      Parameters:
      request - The high-level request.
      Returns:
      The result status.
    • sendRequest

      public void sendRequest(Request request, Response response, Uniform callback) throws Exception
      Deprecated.
      Description copied from class: ClientCall
      Sends the request to the client. Commits the request line, headers and optional entity and send them over the network.
      Overrides:
      sendRequest in class ClientCall
      Parameters:
      request - The high-level request.
      response - The high-level response.
      callback - The callback invoked upon request completion.
      Throws:
      Exception