| POST | /support/chat/send |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class SendChatMessage
{
public String senderId = null;
public String displayName = null;
public HashMap<String,Object> payload = null;
public String channel = null;
public String getSenderId() { return senderId; }
public SendChatMessage setSenderId(String value) { this.senderId = value; return this; }
public String getDisplayName() { return displayName; }
public SendChatMessage setDisplayName(String value) { this.displayName = value; return this; }
public HashMap<String,Object> getPayload() { return payload; }
public SendChatMessage setPayload(HashMap<String,Object> value) { this.payload = value; return this; }
public String getChannel() { return channel; }
public SendChatMessage setChannel(String value) { this.channel = value; return this; }
}
}
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 /support/chat/send HTTP/1.1
Host: support.beto2.webhop.biz
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
senderId: String,
displayName: String,
payload:
{
String: {}
},
channel: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}