All Verbs | /channels/{Channel}/raw |
---|
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 PostRawToChannel
{
public String from = null;
public String toUserId = null;
public String channel = null;
public String message = null;
public String selector = null;
public String getFrom() { return from; }
public PostRawToChannel setFrom(String value) { this.from = value; return this; }
public String getToUserId() { return toUserId; }
public PostRawToChannel setToUserId(String value) { this.toUserId = value; return this; }
public String getChannel() { return channel; }
public PostRawToChannel setChannel(String value) { this.channel = value; return this; }
public String getMessage() { return message; }
public PostRawToChannel setMessage(String value) { this.message = value; return this; }
public String getSelector() { return selector; }
public PostRawToChannel setSelector(String value) { this.selector = value; return this; }
}
}
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 /channels/{Channel}/raw HTTP/1.1
Host: test.servicestack.net
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"from":"String","toUserId":"String","channel":"String","message":"String","selector":"String"}