DecodeBody() public method

Decode body into a form.
If body contents is not valid for the chosen decoder. If body is still being transferred.
public DecodeBody ( FormDecoderProvider providers ) : void
providers FormDecoderProvider A list with form decoders.
return void
 /// <summary>
 /// Decodes the request body.
 /// </summary>
 /// <param name="request">The request.</param>
 /// <exception cref="InternalServerException">Failed to decode form data.</exception>
 protected virtual void DecodeBody(HttpRequest request)
 {
     try
     {
         if (request.Body.Length > 0)
             request.DecodeBody(_formDecodersProvider);
     }
     catch (InvalidOperationException err)
     {
         throw new InternalServerException("Failed to decode form data.", err);
     }
     catch (InvalidDataException err)
     {
         throw new InternalServerException("Form contains invalid format.", err);
     }
 }