"use strict";
export class Poco {
/** @param {{name?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
name;
}
export class TestUploadWithDto {
/** @param {{int?:number,nullableId?:number,long?:number,double?:number,string?:string,dateTime?:string,intArray?:number[],intList?:number[],stringArray?:string[],stringList?:string[],pocoArray?:Poco[],pocoList?:Poco[],nullableByteArray?:number[],nullableByteList?:number[],nullableDateTimeArray?:string[],nullableDateTimeList?:string[],pocoLookup?:{ [index:string]: Poco[]; },pocoLookupMap?:{ [index:string]: { [index:string]: Poco; }[]; },mapList?:{ [index:string]: string[]; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
int;
/** @type {?number} */
nullableId;
/** @type {number} */
long;
/** @type {number} */
double;
/** @type {string} */
string;
/** @type {string} */
dateTime;
/** @type {?number[]} */
intArray;
/** @type {?number[]} */
intList;
/** @type {?string[]} */
stringArray;
/** @type {?string[]} */
stringList;
/** @type {?Poco[]} */
pocoArray;
/** @type {?Poco[]} */
pocoList;
/** @type {?number[]} */
nullableByteArray;
/** @type {?number[]} */
nullableByteList;
/** @type {?string[]} */
nullableDateTimeArray;
/** @type {?string[]} */
nullableDateTimeList;
/** @type {?{ [index:string]: Poco[]; }} */
pocoLookup;
/** @type {?{ [index:string]: { [index:string]: Poco; }[]; }} */
pocoLookupMap;
/** @type {?{ [index:string]: string[]; }} */
mapList;
}
JavaScript TestUploadWithDto DTOs
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 /csv/reply/TestUploadWithDto HTTP/1.1
Host: test.servicestack.net
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"int":0,"nullableId":0,"long":0,"double":0,"string":"String","dateTime":"\/Date(-62135596800000-0000)\/","intArray":[0],"intList":[0],"stringArray":["String"],"stringList":["String"],"pocoArray":[{"name":"String"}],"pocoList":[{"name":"String"}],"nullableByteArray":[0],"nullableByteList":[0],"nullableDateTimeArray":["\/Date(-62135596800000-0000)\/"],"nullableDateTimeList":["\/Date(-62135596800000-0000)\/"],"pocoLookup":{"String":[{"name":"String"}]},"pocoLookupMap":{"String":[{"String":{"name":"String"}}]},"mapList":{"String":["String"]}}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"int":0,"nullableId":0,"long":0,"double":0,"string":"String","dateTime":"\/Date(-62135596800000-0000)\/","intArray":[0],"intList":[0],"stringArray":["String"],"stringList":["String"],"pocoArray":[{"name":"String"}],"pocoList":[{"name":"String"}],"nullableByteArray":[0],"nullableByteList":[0],"nullableDateTimeArray":["\/Date(-62135596800000-0000)\/"],"nullableDateTimeList":["\/Date(-62135596800000-0000)\/"],"pocoLookup":{"String":[{"name":"String"}]},"pocoLookupMap":{"String":[{"String":{"name":"String"}}]},"mapList":{"String":["String"]}}