| Requires any of the roles: | Client, Admin, Partner |
| POST | /test |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:collection';
class TestAddResponse implements IConvertible
{
// @DataMember(Order=2)
String? Desc;
// @DataMember(Order=4)
ResponseStatus? ResponseStatus;
TestAddResponse({this.Desc,this.ResponseStatus});
TestAddResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Desc = json['Desc'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Desc': Desc,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "TestAddResponse";
TypeContext? context = _ctx;
}
// @DataContract
class TestAdd implements IConvertible
{
// @DataMember(Order=2)
// @Validate(Validator="NotNull")
String? Desc;
TestAdd({this.Desc});
TestAdd.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Desc = json['Desc'];
return this;
}
Map<String, dynamic> toJson() => {
'Desc': Desc
};
getTypeName() => "TestAdd";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'duengageapi.uat.scadsoftware.com', types: <String, TypeInfo> {
'TestAddResponse': TypeInfo(TypeOf.Class, create:() => TestAddResponse()),
'TestAdd': TypeInfo(TypeOf.Class, create:() => TestAdd()),
});
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 /test HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Desc":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Desc":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}