POST, PUT | /inbound_title | ||
---|---|---|---|
POST, PUT | /inbound_title/{xmldata} |
import 'package:servicestack/servicestack.dart';
class TitleRequest implements IPost, IPut, IConvertible
{
Uint8List? requestStream;
String? xmldata;
TitleRequest({this.requestStream,this.xmldata});
TitleRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
requestStream = JsonConverters.fromJson(json['requestStream'],'Uint8List',context!);
xmldata = json['xmldata'];
return this;
}
Map<String, dynamic> toJson() => {
'requestStream': JsonConverters.toJson(requestStream,'Uint8List',context!),
'xmldata': xmldata
};
getTypeName() => "TitleRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'titleprocessing_test.sirva.com', types: <String, TypeInfo> {
'TitleRequest': TypeInfo(TypeOf.Class, create:() => TitleRequest()),
'Uint8List': TypeInfo(TypeOf.Class, create:() => Uint8List(0)),
});
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 /inbound_title HTTP/1.1
Host: titleprocessing-test.sirva.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"xmldata":"String"}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {}