Skip to main content

Definition

Assembly: CloudNimble.Breakdance.DotHttp.dll Namespace: CloudNimble.Breakdance.DotHttp Inheritance: System.Object

Syntax

Summary

Captures HTTP responses from named requests for use in request chaining.

Remarks

Supports {{name.response.body.$.path}} for JSONPath, {{name.response.body./xpath}} for XPath, and {{name.response.headers.HeaderName}} for header extraction.

Examples

Constructors

.ctor

Syntax

.ctor Inherited

Inherited from object

Syntax

Methods

CaptureAsync

Captures a response for later reference.

Syntax

Parameters

NameTypeDescription
namestringThe request name (from # @name directive).
responseSystem.Net.Http.HttpResponseMessageThe HTTP response.
requestBodystringThe original request body (for {{name.request.body}} references).

Returns

Type: System.Threading.Tasks.Task

Examples

Clear

Clears all captured responses.

Syntax

Examples

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetResponseBody

Gets the captured response body for a named request.

Syntax

Parameters

NameTypeDescription
namestringThe request name.

Returns

Type: string The response body, or null if not captured.

Examples

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

HasResponse

Checks if a captured response exists for the given name.

Syntax

Parameters

NameTypeDescription
namestringThe request name.

Returns

Type: bool True if the response has been captured.

Examples

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ResolveAllReferences

Resolves all response references in a string.

Syntax

Parameters

NameTypeDescription
inputstringThe input string containing response references.

Returns

Type: string The resolved string.

Examples

ResolveReference

Resolves a response reference to its actual value.

Syntax

Parameters

NameTypeDescription
referencestringThe full reference string (e.g., "{{login.response.body.$.token}}").

Returns

Type: string The resolved value, or the original reference if not found.

Examples

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?