Stumps.BasicHttpResponse.GetBody C# (CSharp) Method

GetBody() public method

Gets the bytes for the HTTP body.
public GetBody ( ) : byte[]
return byte[]
        public virtual byte[] GetBody()
        {
            return _bodyBuffer;
        }

Usage Example

Esempio n. 1
0
        public void ClearBody_WhenCalled_RemovedAllBytes()
        {
            var newBytes = new byte[5]
            {
                1, 2, 3, 4, 5
            };

            var response = new BasicHttpResponse();

            response.AppendToBody(newBytes);
            response.ClearBody();
            Assert.AreEqual(0, response.BodyLength);
            var bodyBytes = response.GetBody();

            Assert.IsNotNull(bodyBytes);
            Assert.AreEqual(0, bodyBytes.Length);
        }
All Usage Examples Of Stumps.BasicHttpResponse::GetBody