Class ParametersNameDecodingHandler
java.lang.Object
com.microsoft.kiota.http.middleware.ParametersNameDecodingHandler
- All Implemented Interfaces:
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface okhttp3.Interceptor
okhttp3.Interceptor.Chain, okhttp3.Interceptor.Companion -
Field Summary
Fields inherited from interface okhttp3.Interceptor
Companion -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of the handler with default optionsCreates a new instance of the handler with the provided options -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdecodeQueryParameters(String original, char[] charactersToDecode) INTERNAL Decodes the query parameters that are in the list of parameters to decodeokhttp3.Responseintercept(okhttp3.Interceptor.Chain chain)
-
Constructor Details
-
ParametersNameDecodingHandler
public ParametersNameDecodingHandler()Creates a new instance of the handler with default options -
ParametersNameDecodingHandler
Creates a new instance of the handler with the provided options- Parameters:
options- the options to use
-
-
Method Details
-
intercept
- Specified by:
interceptin interfaceokhttp3.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 stringcharactersToDecode- the list of characters to decode- Returns:
- the decoded query string
-