Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Test.ServiceModel
Namespace Global
Namespace Test.ServiceModel
Public Partial Class TestFileUploads
Public Overridable Property Id As Integer?
Public Overridable Property RefId As String
End Class
Public Partial Class TestFileUploadsResponse
Public Overridable Property Id As Integer?
Public Overridable Property RefId As String
Public Overridable Property Files As List(Of UploadInfo) = New List(Of UploadInfo)
Public Overridable Property ResponseStatus As ResponseStatus
End Class
Public Partial Class UploadInfo
Public Overridable Property Name As String
Public Overridable Property FileName As String
Public Overridable Property ContentLength As Long
Public Overridable Property ContentType As String
End Class
End Namespace
End Namespace
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 /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"}}}