March 2018
Beginner to intermediate
410 pages
10h 40m
English
The POST request will have some content with it. Decoding this data is simple; we just call the DecodeData() method on the request object. The Content-Type HTTP header determines which decoder will be used when decoding the payload. We will assume plain text will be sent (Content-Type equal to text/plain). This will be decoded into a normal string:
if (!req.HasData)
throw new BadRequestException();
string s = req.DecodeData() as string;
We then use the static Waher.Content.CommonTypes to ...
Read now
Unlock full access