Class ParametersNameDecodingHandler

java.lang.Object
com.microsoft.kiota.http.middleware.ParametersNameDecodingHandler
All Implemented Interfaces:
okhttp3.Interceptor

public class ParametersNameDecodingHandler extends Object implements okhttp3.Interceptor
This handlers decodes special characters in the request query parameters that had to be encoded due to RFC 6570 restrictions names before executing the request.
  • Constructor Details

    • ParametersNameDecodingHandler

      public ParametersNameDecodingHandler()
      Creates a new instance of the handler with default options
    • ParametersNameDecodingHandler

      public ParametersNameDecodingHandler(@Nonnull ParametersNameDecodingOption options)
      Creates a new instance of the handler with the provided options
      Parameters:
      options - the options to use
  • Method Details

    • intercept

      @Nonnull public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException
      Specified by:
      intercept in interface okhttp3.Interceptor
      Throws:
      IOException
    • decodeQueryParameters

      @Nonnull public static String decodeQueryParameters(@Nullable String original, @Nonnull char[] charactersToDecode)
      INTERNAL Decodes the query parameters that are in the list of parameters to decode
      Parameters:
      original - the original query string
      charactersToDecode - the list of characters to decode
      Returns:
      the decoded query string