Class GXHTTPRequestBuilder

java.lang.Object
org.gcube.common.gxhttp.reference.GXHTTPRequestBuilder

@Deprecated(since="1.1.0", forRemoval=true) public class GXHTTPRequestBuilder extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
use GXRequest, which returns a GXResponse
Builder for GXHTTP Requests.
Author:
Manuele Simi (ISTI CNR), Luca Frosini (ISTI-CNR)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final org.slf4j.Logger
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Clears all the parameter except the address.
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    connectTimeout(int connectTimeout)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the connect timeout of the request.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sends the DELETE request to the web application.
    from(String agent)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the identity user agent associated to the request.
    get()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sends the GET request to the web application.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sends the HEAD request to the web application.
    header(String name, String value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Add headers to the request.
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    path(String path)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Adds s positional path parameter to the request.
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sends the PURGE request to the web application.
    put()
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the query parameters for the request.
    readTimeout(int readTimeout)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the read timeout of the request.
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • logger

      protected static final org.slf4j.Logger logger
      Deprecated, for removal: This API element is subject to removal in a future version.
    • connection

      public GXConnection connection
      Deprecated, for removal: This API element is subject to removal in a future version.
    • UUID_REGEX

      public static final String UUID_REGEX
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
  • Constructor Details

    • GXHTTPRequestBuilder

      public GXHTTPRequestBuilder()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • from

      public GXHTTPRequestBuilder from(String agent)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the identity user agent associated to the request.
      Parameters:
      agent -
      Returns:
      the request
    • path

      Deprecated, for removal: This API element is subject to removal in a future version.
      Adds s positional path parameter to the request.
      Parameters:
      path -
      Returns:
      the request
      Throws:
      UnsupportedEncodingException
    • queryParams

      public GXHTTPRequestBuilder queryParams(Map<String,String> parameters) throws UnsupportedEncodingException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the query parameters for the request.
      Parameters:
      parameters - the parameters that go in the URL after the address and the path params.
      Returns:
      the request
      Throws:
      UnsupportedEncodingException
    • header

      public GXHTTPRequestBuilder header(String name, String value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add headers to the request.
      Parameters:
      name -
      value -
    • connectTimeout

      public GXHTTPRequestBuilder connectTimeout(int connectTimeout)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the connect timeout of the request.
      Parameters:
      connectTimeout - the timeout in milliseconds; 0 means infinite
      Returns:
      the request
    • readTimeout

      public GXHTTPRequestBuilder readTimeout(int readTimeout)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the read timeout of the request.
      Parameters:
      readTimeout - the timeout in milliseconds; 0 means infinite
      Returns:
      the request
    • put

      public HttpURLConnection put() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      Exception
    • post

      public HttpURLConnection post() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      Exception
    • get

      public HttpURLConnection get() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sends the GET request to the web application.
      Returns:
      the response
      Throws:
      Exception
    • delete

      public HttpURLConnection delete() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sends the DELETE request to the web application.
      Returns:
      the response
      Throws:
      Exception
    • purge

      public HttpURLConnection purge() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sends the PURGE request to the web application.
      Returns:
      the response
      Throws:
      Exception
    • head

      public HttpURLConnection head() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sends the HEAD request to the web application.
      Returns:
      the response
      Throws:
      Exception
    • clear

      public void clear()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Clears all the parameter except the address.
    • trace

      public HttpURLConnection trace() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      Exception
    • patch

      public HttpURLConnection patch() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      Exception
    • options

      public HttpURLConnection options() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      Exception
    • connect

      public HttpURLConnection connect() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      Exception