All Verbs | /cached/customers |
---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
open class CachedGetAllCustomers : IGet
{
}
@DataContract
open class CustomersResponse
{
@DataMember
open var results:ArrayList<Customer> = ArrayList<Customer>()
@DataMember
open var responseStatus:ResponseStatus? = null
}
@DataContract
open class Customer
{
@DataMember
open var id:String? = null
@DataMember
open var companyName:String? = null
@DataMember
open var contactName:String? = null
@DataMember
open var contactTitle:String? = null
@DataMember
open var address:String? = null
@DataMember
open var city:String? = null
@DataMember
open var region:String? = null
@DataMember
open var postalCode:String? = null
@DataMember
open var country:String? = null
@DataMember
open var phone:String? = null
@DataMember
open var fax:String? = null
}
Kotlin CachedGetAllCustomers DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /cached/customers HTTP/1.1
Host: northwind.netcore.io
Accept: application/json
Content-Type: application/json
Content-Length: length
{}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"results":[{"id":"String","companyName":"String","contactName":"String","contactTitle":"String","address":"String","city":"String","region":"String","postalCode":"String","country":"String","phone":"String","fax":"String"}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}