Definition
Assembly: CloudNimble.Breakdance.DotHttp.dll Namespace: CloudNimble.Breakdance.DotHttp.Models Inheritance: System.ObjectSyntax
Summary
Represents a single HTTP request parsed from a .http file.Remarks
Supports all standard HTTP methods, request chaining via response variable references, file-based request bodies, and request-level variable overrides.Examples
Constructors
.ctor
Syntax
.ctor Inherited
Inherited from
objectSyntax
Properties
Body
Gets or sets the request body content for POST, PUT, and PATCH requests.Syntax
Property Value
Type:string
Remarks
May contain references that are resolved at runtime. For file references, this will be null and DotHttpRequest.BodyFilePath will be set.BodyFilePath
Gets or sets the file path for request body when using file reference syntax.Syntax
Property Value
Type:string
Examples
Remarks
When set, the body content should be loaded from this file path at runtime. The path is relative to the .http file location.Comments
Gets or sets the comments and documentation that appeared before this request.Syntax
Property Value
Type:System.Collections.Generic.List<string>
Remarks
Comments are parsed from lines starting with # or // that precede the request line. The comment markers are preserved for accurate representation.DependsOn
Gets or sets the names of requests this request depends on for chaining.Syntax
Property Value
Type:System.Collections.Generic.List<string>
Examples
HasResponseReferences
Gets a value indicating whether this request references variables from previous responses.Syntax
Property Value
Type:bool
Examples
Headers
Gets or sets the request headers as key-value pairs.Syntax
Property Value
Type:System.Collections.Generic.Dictionary<string, string>
Remarks
Headers are stored with case-insensitive keys per RFC 7230. Header values may contain references that are resolved at runtime.HttpVersion
Gets or sets the HTTP version (HTTP/1.1, HTTP/2, HTTP/3).Syntax
Property Value
Type:string
Remarks
Optional. When not specified, the default HTTP version is used.IsFileBody
Gets a value indicating whether the request body should be loaded from a file.Syntax
Property Value
Type:bool
LineNumber
Gets or sets the line number in the source file where this request begins.Syntax
Property Value
Type:int
Remarks
Used for diagnostics and error reporting.Method
Gets or sets the HTTP method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE, CONNECT).Syntax
Property Value
Type:string
Name
Gets or sets the optional name for the request, parsed from ”# @name RequestName” comment.Syntax
Property Value
Type:string
Remarks
Used for generating test method names and for referencing in request chaining.SeparatorTitle
Gets or sets the text that appeared after the ### separator on the same line.Syntax
Property Value
Type:string
Examples
Remarks
This text is used for generating descriptive test method names when @name is not specified.Url
Gets or sets the request URL.Syntax
Property Value
Type:string
Remarks
May contain references that are resolved at runtime.Variables
Gets or sets the request-level variables that override file-level variables.Syntax
Property Value
Type:System.Collections.Generic.Dictionary<string, string>
Examples
Remarks
Variables defined after a request separator (###) but before the next request line apply only to that request and override file-level variables with the same name.Methods
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
obj | object? | - |
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?