POST | /user/{userid}/email |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class ChangeEmail implements IPost
{
public Integer UserId = null;
public String NewEmail = null;
public Integer getUserId() { return UserId; }
public ChangeEmail setUserId(Integer value) { this.UserId = value; return this; }
public String getNewEmail() { return NewEmail; }
public ChangeEmail setNewEmail(String value) { this.NewEmail = value; return this; }
}
public static class ChangeEmailResponse extends ResponseBase
{
}
public static class ResponseBase
{
public ResponseStatus ResponseStatus = null;
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public ResponseBase setResponseStatus(ResponseStatus value) { this.ResponseStatus = 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 /user/{userid}/email HTTP/1.1
Host: szallitoiportal-be.veolia.hu
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
UserId: 0,
NewEmail: String
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { ResponseStatus: { ErrorCode: String, Message: String, StackTrace: String, Errors: [ { ErrorCode: String, FieldName: String, Message: String, Meta: { String: String } } ], Meta: { String: String } } }