ServiceStack Home (Live)

<back to all web services

Cached

The following routes are available for this service:
All Verbs/Cached
All Verbs/Cached/{Id}
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports MyApp.ServiceInterface

Namespace Global

    Namespace MyApp.ServiceInterface

        Public Partial Class Cached
            Public Overridable Property Id As String
        End Class

        Public Partial Class CachedResponse
            Public Overridable Property Result As String
            Public Overridable Property Counter As Integer
        End Class
    End Namespace
End Namespace

VB.NET Cached DTOs

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

HTTP + CSV

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

POST /Cached HTTP/1.1 
Host: account.servicestack.net 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"id":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"result":"String","counter":0}