Interface GXHTTP<BODY,​RESPONSE>

  • Type Parameters:
    BODY - the type of the body request
    RESPONSE - the type of the response
    All Known Implementing Classes:
    GXHTTPStreamRequest, GXHTTPStringRequest

    public interface GXHTTP<BODY,​RESPONSE>
    HTTP methods for requests.
    Author:
    Manuele Simi (ISTI-CNR)
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      RESPONSE connect()
      Sends the CONNECT request to the web application with no body.
      RESPONSE delete()
      Sends the DELETE request to the web application.
      RESPONSE get()
      Sends the GET request to the web application.
      RESPONSE head()
      Sends the HEAD request to the web application.
      void isExternalCall​(boolean ext)
      States if the service being called in an external service (not gCube).
      RESPONSE options()
      Sends the OPTIONS request to the web application with no body.
      RESPONSE patch()
      Sends the PATCH request to the web application with no body.
      RESPONSE post()
      Sends the POST request to the web application with no body.
      RESPONSE post​(BODY body)
      Sends the POST request to the web application.
      RESPONSE put()
      Sends the PUT request to the web application with no body.
      RESPONSE put​(BODY body)
      Sends the PUT request to the web application.
      void setSecurityToken​(String token)
      Overrides the default security token.
      RESPONSE trace()
      Sends the TRACE request to the web application with no body.
    • Method Detail

      • put

        RESPONSE put​(BODY body)
              throws Exception
        Sends the PUT request to the web application.
        Parameters:
        body - the body of the request
        Returns:
        the response
        Throws:
        Exception
      • put

        RESPONSE put()
              throws Exception
        Sends the PUT request to the web application with no body.
        Returns:
        the response
        Throws:
        Exception
      • delete

        RESPONSE delete()
                 throws Exception
        Sends the DELETE request to the web application.
        Returns:
        the response
        Throws:
        Exception
      • post

        RESPONSE post​(BODY body)
               throws Exception
        Sends the POST request to the web application.
        Parameters:
        body - the body of the request
        Returns:
        the response
        Throws:
        Exception
      • post

        RESPONSE post()
               throws Exception
        Sends the POST request to the web application with no body.
        Returns:
        the response
        Throws:
        Exception
      • trace

        RESPONSE trace()
                throws Exception
        Sends the TRACE request to the web application with no body.
        Returns:
        the response
        Throws:
        Exception
      • patch

        RESPONSE patch()
                throws Exception
        Sends the PATCH request to the web application with no body.
        Returns:
        the response
        Throws:
        Exception
      • options

        RESPONSE options()
                  throws Exception
        Sends the OPTIONS request to the web application with no body.
        Returns:
        the response
        Throws:
        Exception
      • connect

        RESPONSE connect()
                  throws Exception
        Sends the CONNECT request to the web application with no body.
        Returns:
        the response
        Throws:
        Exception
      • setSecurityToken

        void setSecurityToken​(String token)
        Overrides the default security token.
        Parameters:
        token - the new token
      • isExternalCall

        void isExternalCall​(boolean ext)
        States if the service being called in an external service (not gCube).
        Parameters:
        ext - true if external, false otherwise