Test

<back to all web services

AllCollectionTypes


export class Poco
{
    public name: string;

    public constructor(init?: Partial<Poco>) { (Object as any).assign(this, init); }
}

export class AllCollectionTypes
{
    public intArray: number[] = [];
    public intList: number[] = [];
    public stringArray: string[] = [];
    public stringList: string[] = [];
    public floatArray: number[] = [];
    public doubleList: number[] = [];
    public byteArray: string = [];
    public charArray: string[] = [];
    public decimalList: number[] = [];
    public pocoArray: Poco[] = [];
    public pocoList: Poco[] = [];
    public pocoLookup: { [index:string]: Poco[]; } = {};
    public pocoLookupMap: { [index:string]: { [index:string]: Poco; }[]; } = {};

    public constructor(init?: Partial<AllCollectionTypes>) { (Object as any).assign(this, init); }
}

TypeScript AllCollectionTypes DTOs

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

HTTP + OTHER

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

POST /jsonl/reply/AllCollectionTypes HTTP/1.1 
Host: test.servicestack.net 
Accept: text/jsonl
Content-Type: text/jsonl
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"}}]}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
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"}}]}}