Class HttpAccess


  • public class HttpAccess
    extends java.lang.Object
    Http net Object Accessor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String doDelete​(java.lang.String strUrl, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements, java.util.Map<java.lang.String,​java.lang.String> headersRequest, java.util.Map<java.lang.String,​java.lang.String> headersResponse)
      Send a DELETE HTTP request to an url and return the response content.
      java.lang.String doDeleteJSON​(java.lang.String strUrl, java.lang.String strJSON, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements, java.util.Map<java.lang.String,​java.lang.String> headersRequest, java.util.Map<java.lang.String,​java.lang.String> headersResponse)
      Send a DELETE HTTP request to an url and return the response content.
      java.lang.String doGet​(java.lang.String strUrl)
      Send a GET HTTP request to an Url and return the response content.
      java.lang.String doGet​(java.lang.String strUrl, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements)
      Send a GET HTTP request to an Url and return the response content.
      java.lang.String doGet​(java.lang.String strUrl, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements, java.util.Map<java.lang.String,​java.lang.String> headers)
      Send a GET HTTP request to an Url and return the response content.
      java.lang.String doGet​(java.lang.String strUrl, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements, java.util.Map<java.lang.String,​java.lang.String> headersRequest, java.util.Map<java.lang.String,​java.lang.String> headersResponse)
      Send a GET HTTP request to an Url and return the response content.
      java.lang.String doPost​(java.lang.String strUrl, java.util.Map<java.lang.String,​java.lang.String> params)
      Send a POST HTTP request to an url and return the response content.
      java.lang.String doPost​(java.lang.String strUrl, java.util.Map<java.lang.String,​java.lang.String> params, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements)
      Send a POST HTTP request to an url and return the response content.
      java.lang.String doPost​(java.lang.String strUrl, java.util.Map<java.lang.String,​java.lang.String> params, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements, java.util.Map<java.lang.String,​java.lang.String> headersRequest)
      Send a POST HTTP request to an url and return the response content.
      java.lang.String doPost​(java.lang.String strUrl, java.util.Map<java.lang.String,​java.lang.String> params, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements, java.util.Map<java.lang.String,​java.lang.String> headersRequest, java.util.Map<java.lang.String,​java.lang.String> headersResponse)
      Send a POST HTTP request to an url and return the response content.
      java.lang.String doPostJSON​(java.lang.String strUrl, java.lang.String strJSON, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements, java.util.Map<java.lang.String,​java.lang.String> headersRequest, java.util.Map<java.lang.String,​java.lang.String> headersResponse)
      Do post json.
      java.lang.String doPostJSON​(java.lang.String strUrl, java.lang.String strJSON, java.util.Map<java.lang.String,​java.lang.String> headersRequest, java.util.Map<java.lang.String,​java.lang.String> headersResponse)
      Do post json.
      java.lang.String doPostMultiPart​(java.lang.String strUrl, java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params, java.util.Map<java.lang.String,​org.apache.commons.fileupload.FileItem> fileItems)
      Send a POST HTTP request to an url and return the response content.
      java.lang.String doPostMultiPart​(java.lang.String strUrl, java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params, java.util.Map<java.lang.String,​org.apache.commons.fileupload.FileItem> fileItems, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements)
      Send a POST HTTP request to an url and return the response content.
      java.lang.String doPostMultiPart​(java.lang.String strUrl, java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params, java.util.Map<java.lang.String,​org.apache.commons.fileupload.FileItem> fileItems, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements, java.util.Map<java.lang.String,​java.lang.String> headersRequest)
      Send a POST HTTP request to an url and return the response content.
      java.lang.String doPostMultiPart​(java.lang.String strUrl, java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params, java.util.Map<java.lang.String,​org.apache.commons.fileupload.FileItem> fileItems, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements, java.util.Map<java.lang.String,​java.lang.String> headersRequest, java.util.Map<java.lang.String,​java.lang.String> headersResponse)
      Send a POST HTTP request to an url and return the response content.
      java.lang.String doPostMultiValues​(java.lang.String strUrl, java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params)
      Send a POST HTTP request to an url and return the response content.
      java.lang.String doPostMultiValues​(java.lang.String strUrl, java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements)
      Send a POST HTTP request to an url and return the response content.
      java.lang.String doPostMultiValues​(java.lang.String strUrl, java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements, java.util.Map<java.lang.String,​java.lang.String> headersRequest)
      Send a POST HTTP request to an url and return the response content.
      java.lang.String doPostMultiValues​(java.lang.String strUrl, java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements, java.util.Map<java.lang.String,​java.lang.String> headersRequest, java.util.Map<java.lang.String,​java.lang.String> headersResponse)
      Send a POST HTTP request to an url and return the response content.
      java.lang.String doPut​(java.lang.String strUrl, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements, java.util.Map<java.lang.String,​java.lang.String> params, java.util.Map<java.lang.String,​java.lang.String> headersRequest, java.util.Map<java.lang.String,​java.lang.String> headersResponse)
      Send a PUT HTTP request to an url and return the response content.
      java.lang.String doPutJSON​(java.lang.String strUrl, java.lang.String strJSON, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements, java.util.Map<java.lang.String,​java.lang.String> headersRequest, java.util.Map<java.lang.String,​java.lang.String> headersResponse)
      Do put json.
      java.lang.String doPutJSON​(java.lang.String strUrl, java.lang.String strJSON, java.util.Map<java.lang.String,​java.lang.String> headersRequest, java.util.Map<java.lang.String,​java.lang.String> headersResponse)
      Do put json.
      java.lang.String doRequestEnclosingMethod​(java.lang.String strUrl, java.lang.String strMethod, java.lang.String strContent, java.lang.String contentType, java.lang.String charset, fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator, java.util.List<java.lang.String> listElements, java.util.Map<java.lang.String,​java.lang.String> headersRequest, java.util.Map<java.lang.String,​java.lang.String> headersResponse)
      Do request enclosing method.
      org.apache.commons.fileupload.FileItem downloadFile​(java.lang.String strUrl)
      Send a GET HTTP request to an Url and return the response content.
      void downloadFile​(java.lang.String strUrl, java.io.OutputStream outputStream)
      Send a GET HTTP request to an Url and return the response content in the ouput stream.
      void downloadFile​(java.lang.String strUrl, java.lang.String strFilePath)
      Send a GET HTTP request to an Url and return the response content.
      java.lang.String getFileName​(java.lang.String strUrl)
      Send a GET HTTP request to an Url and return the response content.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpAccess

        public HttpAccess()
        Instantiates a new http access.
      • HttpAccess

        public HttpAccess​(ResponseStatusValidator validator)
        Instantiates a new http access.
        Parameters:
        validator - the validator
      • HttpAccess

        public HttpAccess​(HttpAccessService accessService,
                          ResponseStatusValidator validator)
        Instantiates a new http access.
        Parameters:
        accessService - the access service
        validator - the validator
      • HttpAccess

        public HttpAccess​(HttpAccessService accessService)
        Instantiates a new http access.
        Parameters:
        accessService - the access service
    • Method Detail

      • doGet

        public java.lang.String doGet​(java.lang.String strUrl)
                               throws HttpAccessException
        Send a GET HTTP request to an Url and return the response content.
        Parameters:
        strUrl - The Url to access
        Returns:
        The response content of the Get request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doGet

        public java.lang.String doGet​(java.lang.String strUrl,
                                      fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                      java.util.List<java.lang.String> listElements)
                               throws HttpAccessException
        Send a GET HTTP request to an Url and return the response content.
        Parameters:
        strUrl - The Url to access
        authenticator - The RequestAuthenticator
        listElements - to include in the signature
        Returns:
        The response content of the Get request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doGet

        public java.lang.String doGet​(java.lang.String strUrl,
                                      fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                      java.util.List<java.lang.String> listElements,
                                      java.util.Map<java.lang.String,​java.lang.String> headers)
                               throws HttpAccessException
        Send a GET HTTP request to an Url and return the response content.
        Parameters:
        strUrl - The Url to access
        authenticator - The RequestAuthenticator
        listElements - to include in the signature
        headers - the headers
        Returns:
        The response content of the Get request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doGet

        public java.lang.String doGet​(java.lang.String strUrl,
                                      fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                      java.util.List<java.lang.String> listElements,
                                      java.util.Map<java.lang.String,​java.lang.String> headersRequest,
                                      java.util.Map<java.lang.String,​java.lang.String> headersResponse)
                               throws HttpAccessException
        Send a GET HTTP request to an Url and return the response content.
        Parameters:
        strUrl - The Url to access
        authenticator - The RequestAuthenticator
        listElements - to include in the signature
        headersRequest - Map of headers request parameters
        headersResponse - Map to contain response headers
        Returns:
        The response content of the Get request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doPost

        public java.lang.String doPost​(java.lang.String strUrl,
                                       java.util.Map<java.lang.String,​java.lang.String> params)
                                throws HttpAccessException
        Send a POST HTTP request to an url and return the response content.
        Parameters:
        strUrl - the url to access
        params - the list of parameters to post
        Returns:
        The response content of the Post request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doPost

        public java.lang.String doPost​(java.lang.String strUrl,
                                       java.util.Map<java.lang.String,​java.lang.String> params,
                                       fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                       java.util.List<java.lang.String> listElements)
                                throws HttpAccessException
        Send a POST HTTP request to an url and return the response content.
        Parameters:
        strUrl - the url to access
        params - the list of parameters to post
        authenticator - The RequestAuthenticator
        listElements - to include in the signature
        Returns:
        The response content of the Post request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doPost

        public java.lang.String doPost​(java.lang.String strUrl,
                                       java.util.Map<java.lang.String,​java.lang.String> params,
                                       fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                       java.util.List<java.lang.String> listElements,
                                       java.util.Map<java.lang.String,​java.lang.String> headersRequest)
                                throws HttpAccessException
        Send a POST HTTP request to an url and return the response content.
        Parameters:
        strUrl - the url to access
        params - the list of parameters to post
        authenticator - The RequestAuthenticator
        listElements - to include in the signature
        headersRequest - Map of headers request parameters
        Returns:
        The response content of the Post request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doPost

        public java.lang.String doPost​(java.lang.String strUrl,
                                       java.util.Map<java.lang.String,​java.lang.String> params,
                                       fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                       java.util.List<java.lang.String> listElements,
                                       java.util.Map<java.lang.String,​java.lang.String> headersRequest,
                                       java.util.Map<java.lang.String,​java.lang.String> headersResponse)
                                throws HttpAccessException
        Send a POST HTTP request to an url and return the response content.
        Parameters:
        strUrl - the url to access
        params - the list of parameters to post
        authenticator - The RequestAuthenticator
        listElements - to include in the signature
        headersRequest - Map of headers request parameters
        headersResponse - Map to contain response headers
        Returns:
        The response content of the Post request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doRequestEnclosingMethod

        public java.lang.String doRequestEnclosingMethod​(java.lang.String strUrl,
                                                         java.lang.String strMethod,
                                                         java.lang.String strContent,
                                                         java.lang.String contentType,
                                                         java.lang.String charset,
                                                         fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                                         java.util.List<java.lang.String> listElements,
                                                         java.util.Map<java.lang.String,​java.lang.String> headersRequest,
                                                         java.util.Map<java.lang.String,​java.lang.String> headersResponse)
                                                  throws HttpAccessException
        Do request enclosing method.
        Parameters:
        strUrl - the str url
        strMethod - the str method
        strContent - the str content
        contentType - the content type
        charset - the charset
        authenticator - the authenticator
        listElements - the list elements
        headersRequest - the headers request
        headersResponse - the headers response
        Returns:
        the string
        Throws:
        HttpAccessException - the http access exception
      • doPostJSON

        public java.lang.String doPostJSON​(java.lang.String strUrl,
                                           java.lang.String strJSON,
                                           fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                           java.util.List<java.lang.String> listElements,
                                           java.util.Map<java.lang.String,​java.lang.String> headersRequest,
                                           java.util.Map<java.lang.String,​java.lang.String> headersResponse)
                                    throws HttpAccessException
        Do post json.
        Parameters:
        strUrl - the str url
        strJSON - the str json
        authenticator - the authenticator
        listElements - the list elements
        headersRequest - the headers request
        headersResponse - the headers response
        Returns:
        the string
        Throws:
        HttpAccessException - the http access exception
      • doPostJSON

        public java.lang.String doPostJSON​(java.lang.String strUrl,
                                           java.lang.String strJSON,
                                           java.util.Map<java.lang.String,​java.lang.String> headersRequest,
                                           java.util.Map<java.lang.String,​java.lang.String> headersResponse)
                                    throws HttpAccessException
        Do post json.
        Parameters:
        strUrl - the str url
        strJSON - the str json
        headersRequest - the headers request
        headersResponse - the headers response
        Returns:
        the string
        Throws:
        HttpAccessException - the http access exception
      • doPutJSON

        public java.lang.String doPutJSON​(java.lang.String strUrl,
                                          java.lang.String strJSON,
                                          fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                          java.util.List<java.lang.String> listElements,
                                          java.util.Map<java.lang.String,​java.lang.String> headersRequest,
                                          java.util.Map<java.lang.String,​java.lang.String> headersResponse)
                                   throws HttpAccessException
        Do put json.
        Parameters:
        strUrl - the str url
        strJSON - the str json
        authenticator - the authenticator
        listElements - the list elements
        headersRequest - the headers request
        headersResponse - the headers response
        Returns:
        the string
        Throws:
        HttpAccessException - the http access exception
      • doPutJSON

        public java.lang.String doPutJSON​(java.lang.String strUrl,
                                          java.lang.String strJSON,
                                          java.util.Map<java.lang.String,​java.lang.String> headersRequest,
                                          java.util.Map<java.lang.String,​java.lang.String> headersResponse)
                                   throws HttpAccessException
        Do put json.
        Parameters:
        strUrl - the str url
        strJSON - the str json
        headersRequest - the headers request
        headersResponse - the headers response
        Returns:
        the string
        Throws:
        HttpAccessException - the http access exception
      • doPostMultiValues

        public java.lang.String doPostMultiValues​(java.lang.String strUrl,
                                                  java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params)
                                           throws HttpAccessException
        Send a POST HTTP request to an url and return the response content.
        Parameters:
        strUrl - the url to access
        params - the list of parameters to post
        Returns:
        The response content of the Post request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doPostMultiValues

        public java.lang.String doPostMultiValues​(java.lang.String strUrl,
                                                  java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params,
                                                  fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                                  java.util.List<java.lang.String> listElements)
                                           throws HttpAccessException
        Send a POST HTTP request to an url and return the response content.
        Parameters:
        strUrl - the url to access
        params - the list of parameters to post
        authenticator - The RequestAuthenticator
        listElements - to include in the signature
        Returns:
        The response content of the Post request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doPostMultiValues

        public java.lang.String doPostMultiValues​(java.lang.String strUrl,
                                                  java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params,
                                                  fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                                  java.util.List<java.lang.String> listElements,
                                                  java.util.Map<java.lang.String,​java.lang.String> headersRequest)
                                           throws HttpAccessException
        Send a POST HTTP request to an url and return the response content.
        Parameters:
        strUrl - the url to access
        params - the list of parameters to post
        authenticator - The RequestAuthenticator
        listElements - to include in the signature
        headersRequest - Map of headers request parameters
        Returns:
        The response content of the Post request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doPostMultiValues

        public java.lang.String doPostMultiValues​(java.lang.String strUrl,
                                                  java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params,
                                                  fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                                  java.util.List<java.lang.String> listElements,
                                                  java.util.Map<java.lang.String,​java.lang.String> headersRequest,
                                                  java.util.Map<java.lang.String,​java.lang.String> headersResponse)
                                           throws HttpAccessException
        Send a POST HTTP request to an url and return the response content.
        Parameters:
        strUrl - the url to access
        params - the list of parameters to post
        authenticator - The RequestAuthenticator
        listElements - to include in the signature
        headersRequest - Map of headers request parameters
        headersResponse - Map to contain response headers
        Returns:
        The response content of the Post request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doPostMultiPart

        public java.lang.String doPostMultiPart​(java.lang.String strUrl,
                                                java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params,
                                                java.util.Map<java.lang.String,​org.apache.commons.fileupload.FileItem> fileItems)
                                         throws HttpAccessException
        Send a POST HTTP request to an url and return the response content.
        Parameters:
        strUrl - the url to access
        params - the list of parameters to post
        fileItems - The list of file items
        Returns:
        The response content of the Post request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doPostMultiPart

        public java.lang.String doPostMultiPart​(java.lang.String strUrl,
                                                java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params,
                                                java.util.Map<java.lang.String,​org.apache.commons.fileupload.FileItem> fileItems,
                                                fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                                java.util.List<java.lang.String> listElements)
                                         throws HttpAccessException
        Send a POST HTTP request to an url and return the response content.
        Parameters:
        strUrl - the url to access
        params - the list of parameters to post
        fileItems - The list of file items
        authenticator - The RequestAuthenticator
        listElements - to include in the signature
        Returns:
        The response content of the Post request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doPostMultiPart

        public java.lang.String doPostMultiPart​(java.lang.String strUrl,
                                                java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params,
                                                java.util.Map<java.lang.String,​org.apache.commons.fileupload.FileItem> fileItems,
                                                fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                                java.util.List<java.lang.String> listElements,
                                                java.util.Map<java.lang.String,​java.lang.String> headersRequest)
                                         throws HttpAccessException
        Send a POST HTTP request to an url and return the response content.
        Parameters:
        strUrl - the url to access
        params - the list of parameters to post
        fileItems - The list of file items
        authenticator - The RequestAuthenticator
        listElements - to include in the signature
        headersRequest - Map of headers request parameters
        Returns:
        The response content of the Post request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doPostMultiPart

        public java.lang.String doPostMultiPart​(java.lang.String strUrl,
                                                java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params,
                                                java.util.Map<java.lang.String,​org.apache.commons.fileupload.FileItem> fileItems,
                                                fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                                java.util.List<java.lang.String> listElements,
                                                java.util.Map<java.lang.String,​java.lang.String> headersRequest,
                                                java.util.Map<java.lang.String,​java.lang.String> headersResponse)
                                         throws HttpAccessException
        Send a POST HTTP request to an url and return the response content.
        Parameters:
        strUrl - the url to access
        params - the list of parameters to post
        fileItems - The list of file items
        authenticator - The RequestAuthenticator
        listElements - to include in the signature
        headersRequest - Map of headers request parameters
        headersResponse - Map to contain response headers
        Returns:
        The response content of the Post request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doPut

        public java.lang.String doPut​(java.lang.String strUrl,
                                      fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                      java.util.List<java.lang.String> listElements,
                                      java.util.Map<java.lang.String,​java.lang.String> params,
                                      java.util.Map<java.lang.String,​java.lang.String> headersRequest,
                                      java.util.Map<java.lang.String,​java.lang.String> headersResponse)
                               throws HttpAccessException
        Send a PUT HTTP request to an url and return the response content.
        Parameters:
        strUrl - the url to access
        authenticator - The RequestAuthenticator
        listElements - to include in the signature
        params - the params
        headersRequest - Map of headers request parameters
        headersResponse - Map to contain response headers
        Returns:
        The response content of the Post request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doDelete

        public java.lang.String doDelete​(java.lang.String strUrl,
                                         fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                         java.util.List<java.lang.String> listElements,
                                         java.util.Map<java.lang.String,​java.lang.String> headersRequest,
                                         java.util.Map<java.lang.String,​java.lang.String> headersResponse)
                                  throws HttpAccessException
        Send a DELETE HTTP request to an url and return the response content.
        Parameters:
        strUrl - the url to access
        authenticator - The RequestAuthenticator
        listElements - to include in the signature
        headersRequest - Map of headers request parameters
        headersResponse - Map to contain response headers
        Returns:
        The response content of the Post request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • doDeleteJSON

        public java.lang.String doDeleteJSON​(java.lang.String strUrl,
                                             java.lang.String strJSON,
                                             fr.paris.lutece.util.signrequest.RequestAuthenticator authenticator,
                                             java.util.List<java.lang.String> listElements,
                                             java.util.Map<java.lang.String,​java.lang.String> headersRequest,
                                             java.util.Map<java.lang.String,​java.lang.String> headersResponse)
                                      throws HttpAccessException
        Send a DELETE HTTP request to an url and return the response content.
        Parameters:
        strUrl - the url to access
        strJson - the json to send in body
        authenticator - The RequestAuthenticator
        listElements - to include in the signature
        headersRequest - Map of headers request parameters
        headersResponse - Map to contain response headers
        Returns:
        The response content of the Post request to the given Url
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • downloadFile

        public void downloadFile​(java.lang.String strUrl,
                                 java.lang.String strFilePath)
                          throws HttpAccessException
        Send a GET HTTP request to an Url and return the response content.
        Parameters:
        strUrl - The Url to access
        strFilePath - the file path
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • downloadFile

        public void downloadFile​(java.lang.String strUrl,
                                 java.io.OutputStream outputStream)
                          throws HttpAccessException
        Send a GET HTTP request to an Url and return the response content in the ouput stream.
        Parameters:
        strUrl - The Url to access
        outputStream - write in the outpustrean the contents of the file
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • getFileName

        public java.lang.String getFileName​(java.lang.String strUrl)
                                     throws HttpAccessException
        Send a GET HTTP request to an Url and return the response content.
        Parameters:
        strUrl - The Url to access
        Returns:
        the file name
        Throws:
        HttpAccessException - if there is a problem to access to the given Url
      • downloadFile

        public org.apache.commons.fileupload.FileItem downloadFile​(java.lang.String strUrl)
                                                            throws HttpAccessException
        Send a GET HTTP request to an Url and return the response content.
        Parameters:
        strUrl - The Url to access
        Returns:
        a FileItem
        Throws:
        HttpAccessException - if there is a problem to access to the given Url