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 .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: application/json
Content-Type: application/json
Content-Length: length
{}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"sentinel":"String"}