| GET | /api/preview/{EntityType}/{ID} |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class Preview implements IConvertible
{
Preview();
Preview.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "Preview";
TypeContext? context = _ctx;
}
class GetPreview implements IConvertible
{
String? ID;
String? EntityType;
GetPreview({this.ID,this.EntityType});
GetPreview.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ID = json['ID'];
EntityType = json['EntityType'];
return this;
}
Map<String, dynamic> toJson() => {
'ID': ID,
'EntityType': EntityType
};
getTypeName() => "GetPreview";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'test_do_services.klokgroep.nl', types: <String, TypeInfo> {
'Preview': TypeInfo(TypeOf.Class, create:() => Preview()),
'GetPreview': TypeInfo(TypeOf.Class, create:() => GetPreview()),
});
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.
GET /api/preview/{EntityType}/{ID} HTTP/1.1
Host: test-do-services.klokgroep.nl
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
}