Stumps.BasicHttpResponse.GetBodyAsString C# (CSharp) Method

GetBodyAsString() public method

Gets the body of the HTTP response as a T:System.String.
The body is decoded using UTF8 encoding.
public GetBodyAsString ( ) : string
return string
        public virtual string GetBodyAsString()
        {
            return GetBodyAsString(Encoding.UTF8);
        }

Same methods

BasicHttpResponse::GetBodyAsString ( Encoding encoding ) : string

Usage Example

Esempio n. 1
0
        public void GetBody_WithNullEncoding_ThrowsException()
        {
            var response = new BasicHttpResponse();

            response.AppendToBody("ABCD");

            Assert.That(
                () => response.GetBodyAsString(null),
                Throws.Exception.TypeOf <ArgumentNullException>().With.Property("ParamName").EqualTo("encoding"));
        }
All Usage Examples Of Stumps.BasicHttpResponse::GetBodyAsString