Rest module
This small module contains helpers for JSON and XML serialization.
1: 2: 3: 4: 5: 6: 7: 8: 9: |
|
Route returning a PetCategory as JSON:
1:
|
|
Route returning a PetCategory as XML:
1:
|
|
Most REST API response formats depend on "Accept" header sent in the request
The MODEL helper will do it.
1:
|
|
We can also simply read the body stream as JSON serialized object
1: 2: 3: 4: |
|
namespace System
namespace Suave
module Operators
from Suave
from Suave
module Filters
from Suave
from Suave
module Writers
from Suave
from Suave
module Successful
from Suave
from Suave
namespace Suave.Swagger
module Rest
from Suave.Swagger
from Suave.Swagger
module FunnyDsl
from Suave.Swagger
from Suave.Swagger
Multiple items
module Swagger
from Suave.Swagger
--------------------
namespace Suave.Swagger
module Swagger
from Suave.Swagger
--------------------
namespace Suave.Swagger