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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<HelloImage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Test.ServiceInterface">
<Background>String</Background>
<FontFamily>String</FontFamily>
<FontSize>0</FontSize>
<Foreground>String</Foreground>
<Format>String</Format>
<Height>0</Height>
<Name>String</Name>
<Width>0</Width>
</HelloImage>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length (byte[])