Class ApiClient

java.lang.Object
com.algorand.algosdk.algod.client.ApiClient
Direct Known Subclasses:
AlgodClient

@Deprecated
public class ApiClient
extends java.lang.Object
Deprecated.
  • Constructor Summary

    Constructors
    Constructor Description
    ApiClient()
    Deprecated.
     
  • Method Summary

    Modifier and Type Method Description
    ApiClient addDefaultHeader​(java.lang.String key, java.lang.String value)
    Deprecated.
    Add a default header.
    com.squareup.okhttp.Call buildCall​(java.lang.String path, java.lang.String method, java.util.List<Pair> queryParams, java.util.List<Pair> collectionQueryParams, java.lang.Object body, java.util.Map<java.lang.String,​java.lang.String> headerParams, java.util.Map<java.lang.String,​java.lang.Object> formParams, java.lang.String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener)
    Deprecated.
    Build HTTP call with the given options.
    com.squareup.okhttp.Request buildRequest​(java.lang.String path, java.lang.String method, java.util.List<Pair> queryParams, java.util.List<Pair> collectionQueryParams, java.lang.Object body, java.util.Map<java.lang.String,​java.lang.String> headerParams, java.util.Map<java.lang.String,​java.lang.Object> formParams, java.lang.String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener)
    Deprecated.
    Build an HTTP request with the given options.
    com.squareup.okhttp.RequestBody buildRequestBodyFormEncoding​(java.util.Map<java.lang.String,​java.lang.Object> formParams)
    Deprecated.
    Build a form-encoding request body with the given form parameters.
    com.squareup.okhttp.RequestBody buildRequestBodyMultipart​(java.util.Map<java.lang.String,​java.lang.Object> formParams)
    Deprecated.
    Build a multipart (file uploading) request body with the given form parameters, which could contain text fields and file fields.
    java.lang.String buildUrl​(java.lang.String path, java.util.List<Pair> queryParams, java.util.List<Pair> collectionQueryParams)
    Deprecated.
    Build full URL by concatenating base path, the given sub path and query parameters.
    <T> T deserialize​(com.squareup.okhttp.Response response, java.lang.reflect.Type returnType)
    Deprecated.
    Deserialize response body to Java object, according to the return type and the Content-Type response header.
    java.io.File downloadFileFromResponse​(com.squareup.okhttp.Response response)
    Deprecated.
    Download file from the given response.
    java.lang.String escapeString​(java.lang.String str)
    Deprecated.
    Escape the given string to be used as URL query value.
    <T> ApiResponse<T> execute​(com.squareup.okhttp.Call call)
    Deprecated.
    <T> ApiResponse<T> execute​(com.squareup.okhttp.Call call, java.lang.reflect.Type returnType)
    Deprecated.
    Execute HTTP call and deserialize the HTTP response body into the given return type.
    <T> void executeAsync​(com.squareup.okhttp.Call call, ApiCallback<T> callback)
    Deprecated.
    <T> void executeAsync​(com.squareup.okhttp.Call call, java.lang.reflect.Type returnType, ApiCallback<T> callback)
    Deprecated.
    Execute HTTP call asynchronously.
    Authentication getAuthentication​(java.lang.String authName)
    Deprecated.
    Get authentication for the given name.
    java.util.Map<java.lang.String,​Authentication> getAuthentications()
    Deprecated.
    Get authentications (key: authentication name, value: authentication).
    java.lang.String getBasePath()
    Deprecated.
    Get base path
    int getConnectTimeout()
    Deprecated.
    Get connection timeout (in milliseconds).
    java.text.DateFormat getDateFormat()
    Deprecated.
     
    com.squareup.okhttp.OkHttpClient getHttpClient()
    Deprecated.
    Get HTTP client
    JSON getJSON()
    Deprecated.
    Get JSON
    javax.net.ssl.KeyManager[] getKeyManagers()
    Deprecated.
     
    int getReadTimeout()
    Deprecated.
    Get read timeout (in milliseconds).
    java.io.InputStream getSslCaCert()
    Deprecated.
    Get SSL CA cert.
    java.lang.String getTempFolderPath()
    Deprecated.
    The path of temporary folder used to store downloaded files from endpoints with file response.
    int getWriteTimeout()
    Deprecated.
    Get write timeout (in milliseconds).
    java.lang.String guessContentTypeFromFile​(java.io.File file)
    Deprecated.
    Guess Content-Type header from the given file (defaults to "application/octet-stream").
    <T> T handleResponse​(com.squareup.okhttp.Response response, java.lang.reflect.Type returnType)
    Deprecated.
    Handle the given response, return the deserialized object when the response is successful.
    boolean isDebugging()
    Deprecated.
    Check that whether debugging is enabled for this API client.
    boolean isJsonMime​(java.lang.String mime)
    Deprecated.
    Check if the given MIME is a JSON MIME.
    boolean isVerifyingSsl()
    Deprecated.
    True if isVerifyingSsl flag is on
    java.util.List<Pair> parameterToPair​(java.lang.String name, java.lang.Object value)
    Deprecated.
    Formats the specified query parameter to a list containing a single Pair object.
    java.util.List<Pair> parameterToPairs​(java.lang.String collectionFormat, java.lang.String name, java.util.Collection value)
    Deprecated.
    Formats the specified collection query parameters to a list of Pair objects.
    java.lang.String parameterToString​(java.lang.Object param)
    Deprecated.
    Format the given parameter object into string.
    java.io.File prepareDownloadFile​(com.squareup.okhttp.Response response)
    Deprecated.
    Prepare file for download
    void processHeaderParams​(java.util.Map<java.lang.String,​java.lang.String> headerParams, com.squareup.okhttp.Request.Builder reqBuilder)
    Deprecated.
    Set header parameters to the request builder, including default headers.
    java.lang.String sanitizeFilename​(java.lang.String filename)
    Deprecated.
    Sanitize filename by removing path.
    java.lang.String selectHeaderAccept​(java.lang.String[] accepts)
    Deprecated.
    Select the Accept header's value from the given accepts array: if JSON exists in the given array, use it; otherwise use all of them (joining into a string)
    java.lang.String selectHeaderContentType​(java.lang.String[] contentTypes)
    Deprecated.
    Select the Content-Type header's value from the given array: if JSON exists in the given array, use it; otherwise use the first one of the array.
    com.squareup.okhttp.RequestBody serialize​(java.lang.Object obj, java.lang.String contentType)
    Deprecated.
    Serialize the given Java object into request body according to the object's class and the request Content-Type.
    void setAccessToken​(java.lang.String accessToken)
    Deprecated.
    Helper method to set access token for the first OAuth2 authentication.
    void setApiKey​(java.lang.String apiKey)
    Deprecated.
    Helper method to set API key value for the first API key authentication.
    void setApiKeyPrefix​(java.lang.String apiKeyPrefix)
    Deprecated.
    Helper method to set API key prefix for the first API key authentication.
    ApiClient setBasePath​(java.lang.String basePath)
    Deprecated.
    Set base path
    ApiClient setConnectTimeout​(int connectionTimeout)
    Deprecated.
    Sets the connect timeout (in milliseconds).
    ApiClient setDateFormat​(java.text.DateFormat dateFormat)
    Deprecated.
     
    ApiClient setDebugging​(boolean debugging)
    Deprecated.
    Enable/disable debugging for this API client.
    ApiClient setHttpClient​(com.squareup.okhttp.OkHttpClient httpClient)
    Deprecated.
    Set HTTP client
    ApiClient setJSON​(JSON json)
    Deprecated.
    Set JSON
    ApiClient setKeyManagers​(javax.net.ssl.KeyManager[] managers)
    Deprecated.
    Configure client keys to use for authorization in an SSL session.
    ApiClient setLenientOnJson​(boolean lenientOnJson)
    Deprecated.
     
    ApiClient setLocalDateFormat​(org.threeten.bp.format.DateTimeFormatter dateFormat)
    Deprecated.
     
    ApiClient setOffsetDateTimeFormat​(org.threeten.bp.format.DateTimeFormatter dateFormat)
    Deprecated.
     
    void setPassword​(java.lang.String password)
    Deprecated.
    Helper method to set password for the first HTTP basic authentication.
    ApiClient setReadTimeout​(int readTimeout)
    Deprecated.
    Sets the read timeout (in milliseconds).
    ApiClient setSqlDateFormat​(java.text.DateFormat dateFormat)
    Deprecated.
     
    ApiClient setSslCaCert​(java.io.InputStream sslCaCert)
    Deprecated.
    Configure the CA certificate to be trusted when making https requests.
    ApiClient setTempFolderPath​(java.lang.String tempFolderPath)
    Deprecated.
    Set the temporary folder path (for downloading files)
    ApiClient setUserAgent​(java.lang.String userAgent)
    Deprecated.
    Set the User-Agent header's value (by adding to the default header map).
    void setUsername​(java.lang.String username)
    Deprecated.
    Helper method to set username for the first HTTP basic authentication.
    ApiClient setVerifyingSsl​(boolean verifyingSsl)
    Deprecated.
    Configure whether to verify certificate and hostname when making https requests.
    ApiClient setWriteTimeout​(int writeTimeout)
    Deprecated.
    Sets the write timeout (in milliseconds).
    void updateParamsForAuth​(java.lang.String[] authNames, java.util.List<Pair> queryParams, java.util.Map<java.lang.String,​java.lang.String> headerParams)
    Deprecated.
    Update query and header parameters based on authentication settings.

    Methods inherited from class java.lang.Object

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

    • ApiClient

      public ApiClient()
      Deprecated.
  • Method Details

    • getBasePath

      public java.lang.String getBasePath()
      Deprecated.
      Get base path
      Returns:
      Baes path
    • setBasePath

      public ApiClient setBasePath​(java.lang.String basePath)
      Deprecated.
      Set base path
      Parameters:
      basePath - Base path of the URL (e.g http://localhost
      Returns:
      An instance of OkHttpClient
    • getHttpClient

      public com.squareup.okhttp.OkHttpClient getHttpClient()
      Deprecated.
      Get HTTP client
      Returns:
      An instance of OkHttpClient
    • setHttpClient

      public ApiClient setHttpClient​(com.squareup.okhttp.OkHttpClient httpClient)
      Deprecated.
      Set HTTP client
      Parameters:
      httpClient - An instance of OkHttpClient
      Returns:
      Api Client
    • getJSON

      public JSON getJSON()
      Deprecated.
      Get JSON
      Returns:
      JSON object
    • setJSON

      public ApiClient setJSON​(JSON json)
      Deprecated.
      Set JSON
      Parameters:
      json - JSON object
      Returns:
      Api client
    • isVerifyingSsl

      public boolean isVerifyingSsl()
      Deprecated.
      True if isVerifyingSsl flag is on
      Returns:
      True if isVerifySsl flag is on
    • setVerifyingSsl

      public ApiClient setVerifyingSsl​(boolean verifyingSsl)
      Deprecated.
      Configure whether to verify certificate and hostname when making https requests. Default to true. NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks.
      Parameters:
      verifyingSsl - True to verify TLS/SSL connection
      Returns:
      ApiClient
    • getSslCaCert

      public java.io.InputStream getSslCaCert()
      Deprecated.
      Get SSL CA cert.
      Returns:
      Input stream to the SSL CA cert
    • setSslCaCert

      public ApiClient setSslCaCert​(java.io.InputStream sslCaCert)
      Deprecated.
      Configure the CA certificate to be trusted when making https requests. Use null to reset to default.
      Parameters:
      sslCaCert - input stream for SSL CA cert
      Returns:
      ApiClient
    • getKeyManagers

      public javax.net.ssl.KeyManager[] getKeyManagers()
      Deprecated.
    • setKeyManagers

      public ApiClient setKeyManagers​(javax.net.ssl.KeyManager[] managers)
      Deprecated.
      Configure client keys to use for authorization in an SSL session. Use null to reset to default.
      Parameters:
      managers - The KeyManagers to use
      Returns:
      ApiClient
    • getDateFormat

      public java.text.DateFormat getDateFormat()
      Deprecated.
    • setDateFormat

      public ApiClient setDateFormat​(java.text.DateFormat dateFormat)
      Deprecated.
    • setSqlDateFormat

      public ApiClient setSqlDateFormat​(java.text.DateFormat dateFormat)
      Deprecated.
    • setOffsetDateTimeFormat

      public ApiClient setOffsetDateTimeFormat​(org.threeten.bp.format.DateTimeFormatter dateFormat)
      Deprecated.
    • setLocalDateFormat

      public ApiClient setLocalDateFormat​(org.threeten.bp.format.DateTimeFormatter dateFormat)
      Deprecated.
    • setLenientOnJson

      public ApiClient setLenientOnJson​(boolean lenientOnJson)
      Deprecated.
    • getAuthentications

      public java.util.Map<java.lang.String,​Authentication> getAuthentications()
      Deprecated.
      Get authentications (key: authentication name, value: authentication).
      Returns:
      Map of authentication objects
    • getAuthentication

      public Authentication getAuthentication​(java.lang.String authName)
      Deprecated.
      Get authentication for the given name.
      Parameters:
      authName - The authentication name
      Returns:
      The authentication, null if not found
    • setUsername

      public void setUsername​(java.lang.String username)
      Deprecated.
      Helper method to set username for the first HTTP basic authentication.
      Parameters:
      username - Username
    • setPassword

      public void setPassword​(java.lang.String password)
      Deprecated.
      Helper method to set password for the first HTTP basic authentication.
      Parameters:
      password - Password
    • setApiKey

      public void setApiKey​(java.lang.String apiKey)
      Deprecated.
      Helper method to set API key value for the first API key authentication.
      Parameters:
      apiKey - API key
    • setApiKeyPrefix

      public void setApiKeyPrefix​(java.lang.String apiKeyPrefix)
      Deprecated.
      Helper method to set API key prefix for the first API key authentication.
      Parameters:
      apiKeyPrefix - API key prefix
    • setAccessToken

      public void setAccessToken​(java.lang.String accessToken)
      Deprecated.
      Helper method to set access token for the first OAuth2 authentication.
      Parameters:
      accessToken - Access token
    • setUserAgent

      public ApiClient setUserAgent​(java.lang.String userAgent)
      Deprecated.
      Set the User-Agent header's value (by adding to the default header map).
      Parameters:
      userAgent - HTTP request's user agent
      Returns:
      ApiClient
    • addDefaultHeader

      public ApiClient addDefaultHeader​(java.lang.String key, java.lang.String value)
      Deprecated.
      Add a default header.
      Parameters:
      key - The header's key
      value - The header's value
      Returns:
      ApiClient
    • isDebugging

      public boolean isDebugging()
      Deprecated.
      Check that whether debugging is enabled for this API client.
      Returns:
      True if debugging is enabled, false otherwise.
    • setDebugging

      public ApiClient setDebugging​(boolean debugging)
      Deprecated.
      Enable/disable debugging for this API client.
      Parameters:
      debugging - To enable (true) or disable (false) debugging
      Returns:
      ApiClient
    • getTempFolderPath

      public java.lang.String getTempFolderPath()
      Deprecated.
      The path of temporary folder used to store downloaded files from endpoints with file response. The default value is null, i.e. using the system's default tempopary folder.
      Returns:
      Temporary folder path
      See Also:
      createTempFile
    • setTempFolderPath

      public ApiClient setTempFolderPath​(java.lang.String tempFolderPath)
      Deprecated.
      Set the temporary folder path (for downloading files)
      Parameters:
      tempFolderPath - Temporary folder path
      Returns:
      ApiClient
    • getConnectTimeout

      public int getConnectTimeout()
      Deprecated.
      Get connection timeout (in milliseconds).
      Returns:
      Timeout in milliseconds
    • setConnectTimeout

      public ApiClient setConnectTimeout​(int connectionTimeout)
      Deprecated.
      Sets the connect timeout (in milliseconds). A value of 0 means no timeout, otherwise values must be between 1 and Integer.MAX_VALUE.
      Parameters:
      connectionTimeout - connection timeout in milliseconds
      Returns:
      Api client
    • getReadTimeout

      public int getReadTimeout()
      Deprecated.
      Get read timeout (in milliseconds).
      Returns:
      Timeout in milliseconds
    • setReadTimeout

      public ApiClient setReadTimeout​(int readTimeout)
      Deprecated.
      Sets the read timeout (in milliseconds). A value of 0 means no timeout, otherwise values must be between 1 and Integer.MAX_VALUE.
      Parameters:
      readTimeout - read timeout in milliseconds
      Returns:
      Api client
    • getWriteTimeout

      public int getWriteTimeout()
      Deprecated.
      Get write timeout (in milliseconds).
      Returns:
      Timeout in milliseconds
    • setWriteTimeout

      public ApiClient setWriteTimeout​(int writeTimeout)
      Deprecated.
      Sets the write timeout (in milliseconds). A value of 0 means no timeout, otherwise values must be between 1 and Integer.MAX_VALUE.
      Parameters:
      writeTimeout - connection timeout in milliseconds
      Returns:
      Api client
    • parameterToString

      public java.lang.String parameterToString​(java.lang.Object param)
      Deprecated.
      Format the given parameter object into string.
      Parameters:
      param - Parameter
      Returns:
      String representation of the parameter
    • parameterToPair

      public java.util.List<Pair> parameterToPair​(java.lang.String name, java.lang.Object value)
      Deprecated.
      Formats the specified query parameter to a list containing a single Pair object. Note that value must not be a collection.
      Parameters:
      name - The name of the parameter.
      value - The value of the parameter.
      Returns:
      A list containing a single Pair object.
    • parameterToPairs

      public java.util.List<Pair> parameterToPairs​(java.lang.String collectionFormat, java.lang.String name, java.util.Collection value)
      Deprecated.
      Formats the specified collection query parameters to a list of Pair objects. Note that the values of each of the returned Pair objects are percent-encoded.
      Parameters:
      collectionFormat - The collection format of the parameter.
      name - The name of the parameter.
      value - The value of the parameter.
      Returns:
      A list of Pair objects.
    • sanitizeFilename

      public java.lang.String sanitizeFilename​(java.lang.String filename)
      Deprecated.
      Sanitize filename by removing path. e.g. ../../sun.gif becomes sun.gif
      Parameters:
      filename - The filename to be sanitized
      Returns:
      The sanitized filename
    • isJsonMime

      public boolean isJsonMime​(java.lang.String mime)
      Deprecated.
      Check if the given MIME is a JSON MIME. JSON MIME examples: application/json application/json; charset=UTF8 APPLICATION/JSON application/vnd.company+json "* / *" is also default to JSON
      Parameters:
      mime - MIME (Multipurpose Internet Mail Extensions)
      Returns:
      True if the given MIME is JSON, false otherwise.
    • selectHeaderAccept

      public java.lang.String selectHeaderAccept​(java.lang.String[] accepts)
      Deprecated.
      Select the Accept header's value from the given accepts array: if JSON exists in the given array, use it; otherwise use all of them (joining into a string)
      Parameters:
      accepts - The accepts array to select from
      Returns:
      The Accept header to use. If the given array is empty, null will be returned (not to set the Accept header explicitly).
    • selectHeaderContentType

      public java.lang.String selectHeaderContentType​(java.lang.String[] contentTypes)
      Deprecated.
      Select the Content-Type header's value from the given array: if JSON exists in the given array, use it; otherwise use the first one of the array.
      Parameters:
      contentTypes - The Content-Type array to select from
      Returns:
      The Content-Type header to use. If the given array is empty, or matches "any", JSON will be used.
    • escapeString

      public java.lang.String escapeString​(java.lang.String str)
      Deprecated.
      Escape the given string to be used as URL query value.
      Parameters:
      str - String to be escaped
      Returns:
      Escaped string
    • deserialize

      public <T> T deserialize​(com.squareup.okhttp.Response response, java.lang.reflect.Type returnType) throws ApiException
      Deprecated.
      Deserialize response body to Java object, according to the return type and the Content-Type response header.
      Type Parameters:
      T - Type
      Parameters:
      response - HTTP response
      returnType - The type of the Java object
      Returns:
      The deserialized Java object
      Throws:
      ApiException - If fail to deserialize response body, i.e. cannot read response body or the Content-Type of the response is not supported.
    • serialize

      public com.squareup.okhttp.RequestBody serialize​(java.lang.Object obj, java.lang.String contentType) throws ApiException
      Deprecated.
      Serialize the given Java object into request body according to the object's class and the request Content-Type.
      Parameters:
      obj - The Java object
      contentType - The request Content-Type
      Returns:
      The serialized request body
      Throws:
      ApiException - If fail to serialize the given object
    • downloadFileFromResponse

      public java.io.File downloadFileFromResponse​(com.squareup.okhttp.Response response) throws ApiException
      Deprecated.
      Download file from the given response.
      Parameters:
      response - An instance of the Response object
      Returns:
      Downloaded file
      Throws:
      ApiException - If fail to read file content from response and write to disk
    • prepareDownloadFile

      public java.io.File prepareDownloadFile​(com.squareup.okhttp.Response response) throws java.io.IOException
      Deprecated.
      Prepare file for download
      Parameters:
      response - An instance of the Response object
      Returns:
      Prepared file for the download
      Throws:
      java.io.IOException - If fail to prepare file for download
    • execute

      public <T> ApiResponse<T> execute​(com.squareup.okhttp.Call call) throws ApiException
      Deprecated.
      Type Parameters:
      T - Type
      Parameters:
      call - An instance of the Call object
      Returns:
      ApiResponse<T>
      Throws:
      ApiException - If fail to execute the call
    • execute

      public <T> ApiResponse<T> execute​(com.squareup.okhttp.Call call, java.lang.reflect.Type returnType) throws ApiException
      Deprecated.
      Execute HTTP call and deserialize the HTTP response body into the given return type.
      Type Parameters:
      T - The return type corresponding to (same with) returnType
      Parameters:
      returnType - The return type used to deserialize HTTP response body
      call - Call
      Returns:
      ApiResponse object containing response status, headers and data, which is a Java object deserialized from response body and would be null when returnType is null.
      Throws:
      ApiException - If fail to execute the call
    • executeAsync

      public <T> void executeAsync​(com.squareup.okhttp.Call call, ApiCallback<T> callback)
      Deprecated.
      Type Parameters:
      T - Type
      Parameters:
      call - An instance of the Call object
      callback - ApiCallback<T>
    • executeAsync

      public <T> void executeAsync​(com.squareup.okhttp.Call call, java.lang.reflect.Type returnType, ApiCallback<T> callback)
      Deprecated.
      Execute HTTP call asynchronously.
      Type Parameters:
      T - Type
      Parameters:
      call - The callback to be executed when the API call finishes
      returnType - Return type
      callback - ApiCallback
      See Also:
      execute(Call, Type)
    • handleResponse

      public <T> T handleResponse​(com.squareup.okhttp.Response response, java.lang.reflect.Type returnType) throws ApiException
      Deprecated.
      Handle the given response, return the deserialized object when the response is successful.
      Type Parameters:
      T - Type
      Parameters:
      response - Response
      returnType - Return type
      Returns:
      Type
      Throws:
      ApiException - If the response has a unsuccessful status code or fail to deserialize the response body
    • buildCall

      public com.squareup.okhttp.Call buildCall​(java.lang.String path, java.lang.String method, java.util.List<Pair> queryParams, java.util.List<Pair> collectionQueryParams, java.lang.Object body, java.util.Map<java.lang.String,​java.lang.String> headerParams, java.util.Map<java.lang.String,​java.lang.Object> formParams, java.lang.String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException
      Deprecated.
      Build HTTP call with the given options.
      Parameters:
      path - The sub-path of the HTTP URL
      method - The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE"
      queryParams - The query parameters
      collectionQueryParams - The collection query parameters
      body - The request body object
      headerParams - The header parameters
      formParams - The form parameters
      authNames - The authentications to apply
      progressRequestListener - Progress request listener
      Returns:
      The HTTP call
      Throws:
      ApiException - If fail to serialize the request body object
    • buildRequest

      public com.squareup.okhttp.Request buildRequest​(java.lang.String path, java.lang.String method, java.util.List<Pair> queryParams, java.util.List<Pair> collectionQueryParams, java.lang.Object body, java.util.Map<java.lang.String,​java.lang.String> headerParams, java.util.Map<java.lang.String,​java.lang.Object> formParams, java.lang.String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException
      Deprecated.
      Build an HTTP request with the given options.
      Parameters:
      path - The sub-path of the HTTP URL
      method - The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE"
      queryParams - The query parameters
      collectionQueryParams - The collection query parameters
      body - The request body object
      headerParams - The header parameters
      formParams - The form parameters
      authNames - The authentications to apply
      progressRequestListener - Progress request listener
      Returns:
      The HTTP request
      Throws:
      ApiException - If fail to serialize the request body object
    • buildUrl

      public java.lang.String buildUrl​(java.lang.String path, java.util.List<Pair> queryParams, java.util.List<Pair> collectionQueryParams)
      Deprecated.
      Build full URL by concatenating base path, the given sub path and query parameters.
      Parameters:
      path - The sub path
      queryParams - The query parameters
      collectionQueryParams - The collection query parameters
      Returns:
      The full URL
    • processHeaderParams

      public void processHeaderParams​(java.util.Map<java.lang.String,​java.lang.String> headerParams, com.squareup.okhttp.Request.Builder reqBuilder)
      Deprecated.
      Set header parameters to the request builder, including default headers.
      Parameters:
      headerParams - Header parameters in the ofrm of Map
      reqBuilder - Reqeust.Builder
    • updateParamsForAuth

      public void updateParamsForAuth​(java.lang.String[] authNames, java.util.List<Pair> queryParams, java.util.Map<java.lang.String,​java.lang.String> headerParams)
      Deprecated.
      Update query and header parameters based on authentication settings.
      Parameters:
      authNames - The authentications to apply
      queryParams - List of query parameters
      headerParams - Map of header parameters
    • buildRequestBodyFormEncoding

      public com.squareup.okhttp.RequestBody buildRequestBodyFormEncoding​(java.util.Map<java.lang.String,​java.lang.Object> formParams)
      Deprecated.
      Build a form-encoding request body with the given form parameters.
      Parameters:
      formParams - Form parameters in the form of Map
      Returns:
      RequestBody
    • buildRequestBodyMultipart

      public com.squareup.okhttp.RequestBody buildRequestBodyMultipart​(java.util.Map<java.lang.String,​java.lang.Object> formParams)
      Deprecated.
      Build a multipart (file uploading) request body with the given form parameters, which could contain text fields and file fields.
      Parameters:
      formParams - Form parameters in the form of Map
      Returns:
      RequestBody
    • guessContentTypeFromFile

      public java.lang.String guessContentTypeFromFile​(java.io.File file)
      Deprecated.
      Guess Content-Type header from the given file (defaults to "application/octet-stream").
      Parameters:
      file - The given file
      Returns:
      The guessed Content-Type