All Verbs | /hello-image/{Name} |
---|
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 HelloImage
{
public String name = null;
public String format = null;
public Integer width = null;
public Integer height = null;
public Integer fontSize = null;
public String fontFamily = null;
public String foreground = null;
public String background = null;
public String getName() { return name; }
public HelloImage setName(String value) { this.name = value; return this; }
public String getFormat() { return format; }
public HelloImage setFormat(String value) { this.format = value; return this; }
public Integer getWidth() { return width; }
public HelloImage setWidth(Integer value) { this.width = value; return this; }
public Integer getHeight() { return height; }
public HelloImage setHeight(Integer value) { this.height = value; return this; }
public Integer getFontSize() { return fontSize; }
public HelloImage setFontSize(Integer value) { this.fontSize = value; return this; }
public String getFontFamily() { return fontFamily; }
public HelloImage setFontFamily(String value) { this.fontFamily = value; return this; }
public String getForeground() { return foreground; }
public HelloImage setForeground(String value) { this.foreground = value; return this; }
public String getBackground() { return background; }
public HelloImage setBackground(String value) { this.background = 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 /hello-image/{Name} HTTP/1.1
Host: test.servicestack.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
name: String,
format: String,
width: 0,
height: 0,
fontSize: 0,
fontFamily: String,
foreground: String,
background: String
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length (byte[])