Class RestApiRequest

    • Constructor Detail

      • RestApiRequest

        public RestApiRequest​(String login,
                              String password,
                              HttpMethod method,
                              String path,
                              Map<String,​String> queryParameters,
                              Map<String,​Object> headers,
                              String body)
        Create a new API request.
        login - the authentication login to use.
        password - the authentication password to use.
        method - the HttpMethod for the request.
        path - the path of the request.
        queryParameters - the query parameters to append to the url (key/values must be urlencoded).
        headers - the headers for the request.
        body - the body of the request (or empty string if not required).
    • Method Detail

      • body

        public String body()
        the body of the request (empty string if none).
      • queryParameters

        public Map<String,​String> queryParameters()
        the request's url query parameters, as a Map.
      • headers

        public Map<String,​Object> headers()
        the request headers, as a Map.
      • pathWithParameters

        public String pathWithParameters()
        the full path, with query parameters added at the end.