> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# DotHttpFileParser

> Parses .http files into structured [DotHttpFile](/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/Models/DotHttpFile) objects.

## Definition

**Assembly:** CloudNimble.Breakdance.DotHttp.dll

**Namespace:** CloudNimble.Breakdance.DotHttp

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
CloudNimble.Breakdance.DotHttp.DotHttpFileParser
```

## Summary

Parses .http files into structured [DotHttpFile](/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/Models/DotHttpFile) objects.

## Remarks

Implements the full .http file specification as documented at
[https://learn.microsoft.com/en-us/aspnet/core/test/http-files](https://learn.microsoft.com/en-us/aspnet/core/test/http-files)
including variables, request chaining, file references, and multi-line headers.

## Examples

```csharp theme={"dark"}
var parser = new DotHttpFileParser();
var file = parser.Parse(httpFileContent, "api.http");

// Check for parse diagnostics
foreach (var diagnostic in file.Diagnostics)
{
    Console.WriteLine($"{diagnostic.Location}: {diagnostic.GetMessage()}");
}

// Process requests
foreach (var request in file.Requests)
{
    Console.WriteLine($"{request.Method} {request.Url}");
}
```

## Constructors

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> .ctor

#### Syntax

```csharp theme={"dark"}
public DotHttpFileParser()
```

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> .ctor <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Methods

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Equals <Badge color="gray">Inherited</Badge> <Badge color="orange">Virtual</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name  | Type      | Description |
| ----- | --------- | ----------- |
| `obj` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Equals <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name   | Type      | Description |
| ------ | --------- | ----------- |
| `objA` | `object?` | -           |
| `objB` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> GetHashCode <Badge color="gray">Inherited</Badge> <Badge color="orange">Virtual</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> GetType <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> MemberwiseClone <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Parse

Parses a .http file content into a structured model.

#### Syntax

```csharp theme={"dark"}
public CloudNimble.Breakdance.DotHttp.Models.DotHttpFile Parse(string content, string filePath)
```

#### Parameters

| Name       | Type     | Description                               |
| ---------- | -------- | ----------------------------------------- |
| `content`  | `string` | The content of the .http file.            |
| `filePath` | `string` | The file path for reference in the model. |

#### Returns

Type: `CloudNimble.Breakdance.DotHttp.Models.DotHttpFile`
A [DotHttpFile](/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/Models/DotHttpFile) containing the parsed requests, variables, and any parse errors.

#### Exceptions

| Exception               | Description                     |
| ----------------------- | ------------------------------- |
| `ArgumentNullException` | Thrown when *filePath* is null. |

#### Examples

```csharp theme={"dark"}
var parser = new DotHttpFileParser();
var content = File.ReadAllText("api.http");
var file = parser.Parse(content, "api.http");
```

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> ReferenceEquals <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name   | Type      | Description |
| ------ | --------- | ----------- |
| `objA` | `object?` | -           |
| `objB` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> ToString <Badge color="gray">Inherited</Badge> <Badge color="orange">Virtual</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`
