| POST | /files/{UserId}/ |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class Eras2FileDownloadResponse implements IConvertible
{
Map<String,String?>? options;
ResponseStatus? responseStatus;
Eras2FileDownloadResponse({this.options,this.responseStatus});
Eras2FileDownloadResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
options = JsonConverters.fromJson(json['options'],'Map<String,String?>',context!);
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'options': JsonConverters.toJson(options,'Map<String,String?>',context!),
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "Eras2FileDownloadResponse";
TypeContext? context = _ctx;
}
// @DataContract
class Eras2FileDownload implements IConvertible
{
// @DataMember(Name="UserId")
String? UserId;
// @DataMember(Name="FileGuids")
List<String>? FileGuids;
Eras2FileDownload({this.UserId,this.FileGuids});
Eras2FileDownload.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
UserId = json['userId'];
FileGuids = JsonConverters.fromJson(json['fileGuids'],'List<String>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'userId': UserId,
'fileGuids': JsonConverters.toJson(FileGuids,'List<String>',context!)
};
getTypeName() => "Eras2FileDownload";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dumpro_servdesk.eras_online.de', types: <String, TypeInfo> {
'Eras2FileDownloadResponse': TypeInfo(TypeOf.Class, create:() => Eras2FileDownloadResponse()),
'Map<String,String?>': TypeInfo(TypeOf.Class, create:() => Map<String,String?>()),
'Eras2FileDownload': TypeInfo(TypeOf.Class, create:() => Eras2FileDownload()),
});
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 /files/{UserId}/ HTTP/1.1
Host: dumpro-servdesk.eras-online.de
Accept: application/json
Content-Type: application/json
Content-Length: length
{"UserId":"00000000000000000000000000000000","FileGuids":["00000000000000000000000000000000"]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}