Table of Contents

Class RecordedResponse

Namespace
DynaSharp.Testing
Assembly
DynaSharp.Testing.dll

An HTTP response that a RecordingHandler received from DynamoDB. It is a copy, so it stays readable after the client has disposed the response.

public sealed class RecordedResponse
Inheritance
RecordedResponse
Inherited Members

Remarks

The body holds the items DynamoDB returned. Treat a recording like the data it contains.

Properties

Body

Gets the response body, which for DynamoDB is UTF-8 JSON. Empty when the response had no content.

public ReadOnlyMemory<byte> Body { get; }

Property Value

ReadOnlyMemory<byte>

BodyText

Gets the response body as text.

public string BodyText { get; }

Property Value

string

The body decoded as UTF-8.

Headers

Gets the response headers and the content headers (such as Content-Type) by name, ignoring case. A header with several values is joined with a comma and a space. DynamoDB sends its request id as x-amzn-RequestId.

public IReadOnlyDictionary<string, string> Headers { get; }

Property Value

IReadOnlyDictionary<string, string>

StatusCode

Gets the HTTP status code.

public HttpStatusCode StatusCode { get; }

Property Value

HttpStatusCode