Skip to main content

Definition

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

Syntax

CloudNimble.Breakdance.DotHttp.Models.DotHttpFile

Summary

Represents a complete parsed .http file containing variables and requests.

Remarks

A .http file can contain multiple requests separated by ### and file-level variables. Variables are case-sensitive per the Microsoft specification.

Examples

@baseUrl = https://api.example.com

### Get all users
GET {{baseUrl}}/users

### Create user
POST {{baseUrl}}/users
Content-Type: application/json

{"name": "John"}

Constructors

.ctor

Syntax

public DotHttpFile()

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

Diagnostics

Gets or sets the parsing diagnostics encountered while parsing this file.

Syntax

public System.Collections.Generic.List<Microsoft.CodeAnalysis.Diagnostic> Diagnostics { get; set; }

Property Value

Type: System.Collections.Generic.List<Microsoft.CodeAnalysis.Diagnostic>

Remarks

Contains Roslyn diagnostic information for malformed content that could not be parsed.

FilePath

Gets or sets the file path relative to the project.

Syntax

public string FilePath { get; set; }

Property Value

Type: string

HasChainedRequests

Gets a value indicating whether any requests in this file have dependencies on other requests.

Syntax

public bool HasChainedRequests { get; }

Property Value

Type: bool

Remarks

Returns true when any request uses response variable references like {{login.response.body.$.token}}.

Requests

Gets or sets all HTTP requests defined in the file.

Syntax

public System.Collections.Generic.List<CloudNimble.Breakdance.DotHttp.Models.DotHttpRequest> Requests { get; set; }

Property Value

Type: System.Collections.Generic.List<CloudNimble.Breakdance.DotHttp.Models.DotHttpRequest>

Remarks

Requests are separated by ### in the source file.

Variables

Gets or sets the file-level variables defined with @name=value syntax.

Syntax

public System.Collections.Generic.Dictionary<string, string> Variables { get; set; }

Property Value

Type: System.Collections.Generic.Dictionary<string, string>

Examples

@baseUrl = https://api.example.com
@apiVersion = v2

Remarks

Variable names are case-sensitive per the Microsoft specification.

Methods

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?