Required role: | Admin |
All Verbs | /AdminChangeEmail |
---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
@ValidateRequest(Validator="IsAdmin")
public static class AdminChangeEmail implements IPost
{
@Validate(Validator="NotEmpty")
public String from = null;
@Validate(Validator="NotEmpty")
public String to = null;
public String getFrom() { return from; }
public AdminChangeEmail setFrom(String value) { this.from = value; return this; }
public String getTo() { return to; }
public AdminChangeEmail setTo(String value) { this.to = value; return this; }
}
@DataContract
public static class StringResponse implements IMeta
{
@DataMember(Order=1)
public String result = null;
@DataMember(Order=2)
public HashMap<String,String> meta = null;
@DataMember(Order=3)
public ResponseStatus responseStatus = null;
public String getResult() { return result; }
public StringResponse setResult(String value) { this.result = value; return this; }
public HashMap<String,String> getMeta() { return meta; }
public StringResponse setMeta(HashMap<String,String> value) { this.meta = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public StringResponse setResponseStatus(ResponseStatus value) { this.responseStatus = 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 /AdminChangeEmail HTTP/1.1
Host: account.servicestack.net
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"from":"String","to":"String"}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"result":"String","meta":{"String":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}