POST | /log/test |
---|
library ConsumerApi;
import 'package:servicestack/servicestack.dart';
class TestLogResponse implements IConvertible
{
String? sentinel;
TestLogResponse({this.sentinel});
TestLogResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
sentinel = json['sentinel'];
return this;
}
Map<String, dynamic> toJson() => {
'sentinel': sentinel
};
getTypeName() => "TestLogResponse";
TypeContext? context = _ctx;
}
class TestLogRequest implements IPost, IConvertible
{
TestLogRequest();
TestLogRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "TestLogRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'ConsumerApi', types: <String, TypeInfo> {
'TestLogResponse': TypeInfo(TypeOf.Class, create:() => TestLogResponse()),
'TestLogRequest': TypeInfo(TypeOf.Class, create:() => TestLogRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /log/test HTTP/1.1
Host: unstable-consumer-api.brovs.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { sentinel: String }