createSessionTokenWithHttpInfo method
Future<Response>
createSessionTokenWithHttpInfo(
- String sessionId, {
- CreateSessionTokenRequest? createSessionTokenRequest,
Create a session token
Creates a session JSON Web Token (JWT) based on a session.
Note: This method returns the HTTP Response
.
Parameters:
-
String sessionId (required): The ID of the session
-
CreateSessionTokenRequest createSessionTokenRequest:
Implementation
Future<http.Response> createSessionTokenWithHttpInfo(
String sessionId, {
CreateSessionTokenRequest? createSessionTokenRequest,
}) async {
// ignore: prefer_const_declarations
final path =
r'/sessions/{session_id}/tokens'.replaceAll('{session_id}', sessionId);
// ignore: prefer_final_locals
Object? postBody = createSessionTokenRequest;
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,
);
}