All Verbs | /channels/{Channel}/object |
---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
public static class PostObjectToChannel
{
public String toUserId = null;
public String channel = null;
public String selector = null;
public CustomType customType = null;
public SetterType setterType = null;
public String getToUserId() { return toUserId; }
public PostObjectToChannel setToUserId(String value) { this.toUserId = value; return this; }
public String getChannel() { return channel; }
public PostObjectToChannel setChannel(String value) { this.channel = value; return this; }
public String getSelector() { return selector; }
public PostObjectToChannel setSelector(String value) { this.selector = value; return this; }
public CustomType getCustomType() { return customType; }
public PostObjectToChannel setCustomType(CustomType value) { this.customType = value; return this; }
public SetterType getSetterType() { return setterType; }
public PostObjectToChannel setSetterType(SetterType value) { this.setterType = value; return this; }
}
public static class CustomType
{
public Integer id = null;
public String name = null;
public Integer getId() { return id; }
public CustomType setId(Integer value) { this.id = value; return this; }
public String getName() { return name; }
public CustomType setName(String value) { this.name = value; return this; }
}
public static class SetterType
{
public Integer id = null;
public String name = null;
public Integer getId() { return id; }
public SetterType setId(Integer value) { this.id = value; return this; }
public String getName() { return name; }
public SetterType setName(String value) { this.name = value; return this; }
}
}
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 /channels/{Channel}/object HTTP/1.1
Host: test.servicestack.net
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"toUserId":"String","channel":"String","selector":"String","customType":{"id":0,"name":"String"},"setterType":{"id":0,"name":"String"}}