PeanutButter
Loading...
Searching...
No Matches
PeanutButter.SimpleHTTPServer.StreamExtensions Class Reference

Provides some extensions for the stream object provided into a HttpServer handler function. More...

Static Public Member Functions

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.
 

Detailed Description

Provides some extensions for the stream object provided into a HttpServer handler function.

Member Function Documentation

◆ As< T >() [1/2]

static 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
stream
Template Parameters
T
Returns

◆ As< T >() [2/2]

static 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
stream
encoding
Template Parameters
T
Returns

The documentation for this class was generated from the following file: