All Verbs | /channels/{Channel}/object |
---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Test.ServiceInterface
Namespace Global
Namespace Test.ServiceInterface
Public Partial Class CustomType
Public Overridable Property Id As Integer
Public Overridable Property Name As String
End Class
Public Partial Class PostObjectToChannel
Public Overridable Property ToUserId As String
Public Overridable Property Channel As String
Public Overridable Property Selector As String
Public Overridable Property CustomType As CustomType
Public Overridable Property SetterType As SetterType
End Class
Public Partial Class SetterType
Public Overridable Property Id As Integer
Public Overridable Property Name As String
End Class
End Namespace
End Namespace
VB.NET PostObjectToChannel DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /channels/{Channel}/object HTTP/1.1
Host: test.servicestack.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
toUserId: String,
channel: String,
selector: String,
customType:
{
id: 0,
name: String
},
setterType:
{
id: 0,
name: String
}
}