Test

<back to all web services

TestDataAllCollectionTypes

The following routes are available for this service:
All Verbs/testdata/AllCollectionTypes
"use strict";
export class Poco {
    /** @param {{name?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    name;
}
export class AllCollectionTypes {
    /** @param {{intArray?:number[],intList?:number[],stringArray?:string[],stringList?:string[],floatArray?:number[],doubleList?:number[],byteArray?:string,charArray?:string[],decimalList?:number[],pocoArray?:Poco[],pocoList?:Poco[],pocoLookup?:{ [index: string]: Poco[]; },pocoLookupMap?:{ [index: string]: { [index:string]: Poco; }[]; }}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number[]} */
    intArray;
    /** @type {number[]} */
    intList;
    /** @type {string[]} */
    stringArray;
    /** @type {string[]} */
    stringList;
    /** @type {number[]} */
    floatArray;
    /** @type {number[]} */
    doubleList;
    /** @type {string} */
    byteArray;
    /** @type {string[]} */
    charArray;
    /** @type {number[]} */
    decimalList;
    /** @type {Poco[]} */
    pocoArray;
    /** @type {Poco[]} */
    pocoList;
    /** @type {{ [index: string]: Poco[]; }} */
    pocoLookup;
    /** @type {{ [index: string]: { [index:string]: Poco; }[]; }} */
    pocoLookupMap;
}
export class TestDataAllCollectionTypes {
    constructor(init) { Object.assign(this, init) }
}

JavaScript TestDataAllCollectionTypes DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /testdata/AllCollectionTypes HTTP/1.1 
Host: test.servicestack.net 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"intArray":[0],"intList":[0],"stringArray":["String"],"stringList":["String"],"floatArray":[0],"doubleList":[0],"byteArray":"AA==","charArray":["\u0000"],"decimalList":[0],"pocoArray":[{"name":"String"}],"pocoList":[{"name":"String"}],"pocoLookup":{"String":[{"name":"String"}]},"pocoLookupMap":{"String":[{"String":{"name":"String"}}]}}