forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Formats
Arxisos edited this page Dec 30, 2011
·
5 revisions
ServiceStack supports 6 response formats out of the box:
- JSON
- XML
- JSV (hybrid CSV-style escaping + JSON format that is optimized for both size and speed)
- HTML 5 (provides a readable and semantic HTML layout letting you visualize all the data returned by your web service)
- CSV
- Markdown Razor (Razor combined with markdown)
You can define which format should be used by adding ?format={format} to the end of the URL.
?format=json?format=xml?format=jsv?format=csv?format=html
Example: http://www.servicestack.net/ServiceStack.Hello/servicestack/hello/World!?format=json
Alternatively ServiceStack also recognizes which format should be used with the Content-Type http header:
Content-Type application/jsonContent-Type application/xml
As you can see, this approach only works with json and xml.
- Why ServiceStack?
- What is a message based web service?
- Advantages of message based web services
- Why remote services should use separate DTOs
- Getting Started
- Reference
- Clients
- Formats
- View Engines 4. Razor & Markdown Razor
- Hosts
- Security
- Advanced
- Configuration options
- Access HTTP specific features in services
- Logging
- Serialization/deserialization
- Request/response filters
- Filter attributes
- Concurrency Model
- Built-in caching options
- Built-in profiling
- Messaging and Redis
- Form Hijacking Prevention
- Auto-Mapping
- HTTP Utils
- Virtual File System
- Config API
- Physical Project Structure
- Modularizing Services
- MVC Integration
- Plugins 3. Request logger 4. Swagger API
- Tests
- Other Languages
- Use Cases
- Performance
- How To
- Future