My ServiceStack Backend

<back to all web services

LogoutRequest

The following routes are available for this service:
POST/logout
import 'package:servicestack/servicestack.dart';

class LogoutResponse implements IConvertible
{
    int? responseCode;

    LogoutResponse({this.responseCode});
    LogoutResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        responseCode = json['responseCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'responseCode': responseCode
    };

    getTypeName() => "LogoutResponse";
    TypeContext? context = _ctx;
}

class LogoutRequest implements IConvertible
{
    LogoutRequest();
    LogoutRequest.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "LogoutRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'portal_api.migrantleap.com', types: <String, TypeInfo> {
    'LogoutResponse': TypeInfo(TypeOf.Class, create:() => LogoutResponse()),
    'LogoutRequest': TypeInfo(TypeOf.Class, create:() => LogoutRequest()),
});

Dart LogoutRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /logout HTTP/1.1 
Host: portal-api.migrantleap.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"responseCode":0}