All Verbs | /cached/customers |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class CachedGetAllCustomers : IGet
{
}
@DataContract
open class CustomersResponse
{
@DataMember
var results:ArrayList<Customer> = ArrayList<Customer>()
@DataMember
var responseStatus:ResponseStatus? = null
}
@DataContract
open class Customer
{
@DataMember
var id:String? = null
@DataMember
var companyName:String? = null
@DataMember
var contactName:String? = null
@DataMember
var contactTitle:String? = null
@DataMember
var address:String? = null
@DataMember
var city:String? = null
@DataMember
var region:String? = null
@DataMember
var postalCode:String? = null
@DataMember
var country:String? = null
@DataMember
var phone:String? = null
@DataMember
var fax:String? = null
}
Kotlin CachedGetAllCustomers DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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: text/x-vcard
Content-Type: text/x-vcard
Content-Length: length
{}
HTTP/1.1 200 OK Content-Type: text/x-vcard 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"}}}