Provides some extensions for the stream object provided into a HttpServer handler function.
More...
|
static T | As< T > (this Stream stream) |
| Attempt to read the stream and deserialize JSON to an object of type T. If T is 'string', you get the string back. Uses the UTF8 encoding for reading a string.
|
static T | As< T > (this Stream stream, Encoding encoding) |
| Attempt to read the stream and deserialize to an object of type T. If T is 'string', you get the string back.
|
Provides some extensions for the stream object provided into a HttpServer handler function.
◆ As< T >() [1/2]
T PeanutButter.SimpleHTTPServer.StreamExtensions.As< T > |
( |
this Stream | stream | ) |
|
|
static |
Attempt to read the stream and deserialize JSON to an object of type T. If T is 'string', you get the string back. Uses the UTF8 encoding for reading a string.
- Parameters
-
- Template Parameters
-
- Returns
◆ As< T >() [2/2]
T PeanutButter.SimpleHTTPServer.StreamExtensions.As< T > |
( |
this Stream | stream, |
|
|
Encoding | encoding ) |
|
static |
Attempt to read the stream and deserialize to an object of type T. If T is 'string', you get the string back.
- Parameters
-
- Template Parameters
-
- Returns
The documentation for this class was generated from the following file:
- source/SimpleServers/PeanutButter.SimpleHTTPServer/StreamExtensions.cs