| POST | /RestApi/translations/fileupload |
|---|
import 'package:servicestack/servicestack.dart';
class FileUpload implements IConvertible
{
Uint8List? RequestStream;
String? FileName;
String? Connector;
FileUpload({this.RequestStream,this.FileName,this.Connector});
FileUpload.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RequestStream = JsonConverters.fromJson(json['RequestStream'],'Uint8List',context!);
FileName = json['FileName'];
Connector = json['Connector'];
return this;
}
Map<String, dynamic> toJson() => {
'RequestStream': JsonConverters.toJson(RequestStream,'Uint8List',context!),
'FileName': FileName,
'Connector': Connector
};
getTypeName() => "FileUpload";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'www.imglobal.com', types: <String, TypeInfo> {
'FileUpload': TypeInfo(TypeOf.Class, create:() => FileUpload()),
'Uint8List': TypeInfo(TypeOf.Class, create:() => Uint8List(0)),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /RestApi/translations/fileupload HTTP/1.1
Host: www.imglobal.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"FileName":"String","Connector":"String"}