Interface IHttpTransportProvider

    • Method Detail

      • doGet

        String doGet​(String strEndPointUrl,
                     Map<String,​String> mapParams,
                     Map<String,​String> mapHeadersRequest)
        make a Get request on given url with parameters
        Parameters:
        strEndPointUrl - url
        mapParams - mapParams
        mapHeadersRequest - request header
        Returns:
        response list
      • doPost

        String doPost​(String strEndPointUrl,
                      Map<String,​String> mapParams,
                      Map<String,​String> mapHeadersRequest)
        make POST request on given url with params and headers
        Parameters:
        strUrl - url to call
        mapParams - params to post
        mapHeadersRequest - headers of the request
        Returns:
        response body as String
      • doPostJson

        String doPostJson​(String strEndPointUrl,
                          String json,
                          Map<String,​String> mapHeadersRequest)
        make POST JSON request on given url with json and headers
        Parameters:
        strUrl - url to call
        json - json
        mapHeadersRequest - headers of the request
        Returns:
        response body as String
      • doPut

        String doPut​(String strEndPointUrl,
                     Map<String,​String> mapParams,
                     Map<String,​String> mapHeadersRequest)
        make Put request on given url with params and headers
        Parameters:
        strUrl - url to call
        mapParams - params to post
        mapHeadersRequest - headers of the request
        Returns:
        response body as String
      • doPutJson

        String doPutJson​(String strEndPointUrl,
                         String json,
                         Map<String,​String> mapHeadersRequest)
        make Put json request on given url with Json and headers
        Parameters:
        strUrl - url to call
        json - json
        mapHeadersRequest - headers of the request
        Returns:
        response body as String
      • setApiEndPointUrl

        void setApiEndPointUrl​(String strApiEndPointUrl)
        set end point
        Parameters:
        strApiEndPointUrl -
      • getApiEndPointUrl

        String getApiEndPointUrl()
        get end point
        Returns:
        strEndPointUrl
      • doDelete

        String doDelete​(String strEndPointUrl,
                        Map<String,​String> mapHeadersRequest)
        make a DELETE request on given url with parameters
        Parameters:
        strEndPointUrl - url
        mapParams - mapParams
        mapHeadersRequest - request header
        Returns:
        response list