All Verbs | /testdata/AllCollectionTypes |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class TestDataAllCollectionTypes
{
}
open class AllCollectionTypes
{
var intArray:ArrayList<Int>? = null
var intList:ArrayList<Int> = ArrayList<Int>()
var stringArray:ArrayList<String>? = null
var stringList:ArrayList<String> = ArrayList<String>()
var floatArray:ArrayList<Float>? = null
var doubleList:ArrayList<Double> = ArrayList<Double>()
var byteArray:ByteArray? = null
var charArray:ArrayList<String>? = null
var decimalList:ArrayList<BigDecimal> = ArrayList<BigDecimal>()
var pocoArray:ArrayList<Poco>? = null
var pocoList:ArrayList<Poco> = ArrayList<Poco>()
var pocoLookup:HashMap<String,ArrayList<Poco>> = HashMap<String,ArrayList<Poco>>()
var pocoLookupMap:HashMap<String,ArrayList<HashMap<String,Poco>>> = HashMap<String,ArrayList<HashMap<String,Poco>>>()
}
open class Poco
{
var name:String? = null
}
Kotlin TestDataAllCollectionTypes 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 /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"}}]}}