Package com.microsoft.kiota
Interface ResponseHandler
- All Known Implementing Classes:
NativeResponseHandler
public interface ResponseHandler
Defines the contract for a response handler.
-
Method Summary
Modifier and TypeMethodDescription<NativeResponseType,ModelType>
ModelTypehandleResponse(NativeResponseType response, HashMap<String, ParsableFactory<? extends Parsable>> errorMappings) Callback method that is invoked when a response is received.
-
Method Details
-
handleResponse
@Nullable <NativeResponseType,ModelType> ModelType handleResponse(@Nonnull NativeResponseType response, @Nullable HashMap<String, ParsableFactory<? extends Parsable>> errorMappings) Callback method that is invoked when a response is received.- Type Parameters:
NativeResponseType- The type of the native response object.ModelType- The type of the response model object.- Parameters:
response- The native response object.errorMappings- the error mappings for the response to use when deserializing failed responses bodies. Where an error code like 401 applies specifically to that status code, a class code like 4XX applies to all status codes within the range if an the specific error code is not present.- Returns:
- The deserialized response model object.
-