All Verbs | /throwbusinesserror |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
import 'dart:collection';
class ThrowBusinessError implements IConvertible
{
ThrowBusinessError();
ThrowBusinessError.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "ThrowBusinessError";
TypeContext? context = _ctx;
}
class ThrowBusinessErrorResponse implements IConvertible
{
ResponseStatus? responseStatus;
ThrowBusinessErrorResponse({this.responseStatus});
ThrowBusinessErrorResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "ThrowBusinessErrorResponse";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'test.servicestack.net', types: <String, TypeInfo> {
'ThrowBusinessError': TypeInfo(TypeOf.Class, create:() => ThrowBusinessError()),
'ThrowBusinessErrorResponse': TypeInfo(TypeOf.Class, create:() => ThrowBusinessErrorResponse()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /throwbusinesserror HTTP/1.1
Host: test.servicestack.net
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}