createSessionWithHttpInfo method

Future<Response> createSessionWithHttpInfo({
  1. CreateSessionRequest? createSessionRequest,
})

Create a new active session

Create a new active session for the provided user ID. This operation is intended only for use in testing, and is not available for production instances. If you are looking to generate a user session from the backend, we recommend using the Sign-in Tokens resource instead.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<http.Response> createSessionWithHttpInfo({
  CreateSessionRequest? createSessionRequest,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/sessions';

  // ignore: prefer_final_locals
  Object? postBody = createSessionRequest;

  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,
  );
}