Test

<back to all web services

TestFileUploads

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 TestFileUploads
    {
        public Integer id = null;
        public String refId = null;
        
        public Integer getId() { return id; }
        public TestFileUploads setId(Integer value) { this.id = value; return this; }
        public String getRefId() { return refId; }
        public TestFileUploads setRefId(String value) { this.refId = value; return this; }
    }

    public static class TestFileUploadsResponse
    {
        public Integer id = null;
        public String refId = null;
        public ArrayList<UploadInfo> files = new ArrayList<UploadInfo>();
        public ResponseStatus responseStatus = null;
        
        public Integer getId() { return id; }
        public TestFileUploadsResponse setId(Integer value) { this.id = value; return this; }
        public String getRefId() { return refId; }
        public TestFileUploadsResponse setRefId(String value) { this.refId = value; return this; }
        public ArrayList<UploadInfo> getFiles() { return files; }
        public TestFileUploadsResponse setFiles(ArrayList<UploadInfo> value) { this.files = value; return this; }
        public ResponseStatus getResponseStatus() { return responseStatus; }
        public TestFileUploadsResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
    }

    public static class UploadInfo
    {
        public String name = null;
        public String fileName = null;
        public Long contentLength = null;
        public String contentType = null;
        
        public String getName() { return name; }
        public UploadInfo setName(String value) { this.name = value; return this; }
        public String getFileName() { return fileName; }
        public UploadInfo setFileName(String value) { this.fileName = value; return this; }
        public Long getContentLength() { return contentLength; }
        public UploadInfo setContentLength(Long value) { this.contentLength = value; return this; }
        public String getContentType() { return contentType; }
        public UploadInfo setContentType(String value) { this.contentType = value; return this; }
    }

}

Java TestFileUploads DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /jsonl/reply/TestFileUploads HTTP/1.1 
Host: test.servicestack.net 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":0,"refId":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"id":0,"refId":"String","files":[{"name":"String","fileName":"String","contentLength":0,"contentType":"String"}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}