refreshSessionWithHttpInfo method
Future<Response>
refreshSessionWithHttpInfo(
- String sessionId, {
- RefreshSessionRequest? refreshSessionRequest,
Refresh a session
Refreshes a session by creating a new session token. A 401 is returned when there are validation errors, which signals the SDKs to fall back to the handshake flow.
Note: This method returns the HTTP Response.
Parameters:
-
String sessionId (required): The ID of the session
-
RefreshSessionRequest refreshSessionRequest: Refresh session parameters
Implementation
Future<http.Response> refreshSessionWithHttpInfo(
String sessionId, {
RefreshSessionRequest? refreshSessionRequest,
}) async {
// ignore: prefer_const_declarations
final path =
r'/sessions/{session_id}/refresh'.replaceAll('{session_id}', sessionId);
// ignore: prefer_final_locals
Object? postBody = refreshSessionRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}