# IResourceWithEndpoints.withHttpCommand

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Defined on: [IResourceWithEndpoints](/reference/api/typescript/aspire.hosting/iresourcewithendpoints.md)
- Version: `13.4.0`
- Kind: `method`

Adds an HTTP resource command

## Definition

```typescript
interface IResourceWithEndpoints {
  // ... omitted for brevity
  withHttpCommand(
      path: string,
      displayName: string,
      options?: HttpCommandExportOptions): IResourceWithEndpoints;
}
```

## Signature

```typescript
withHttpCommand(
    path: string,
    displayName: string,
    options?: HttpCommandExportOptions): IResourceWithEndpoints
```

## Parameters

- `path` (`string`)
- `displayName` (`string`)
- `options` ([HttpCommandExportOptions](/reference/api/typescript/aspire.hosting/httpcommandexportoptions.md)) `optional`

## Returns

[IResourceWithEndpoints](/reference/api/typescript/aspire.hosting/iresourcewithendpoints.md) `builder`

## Defined on

- [IResourceWithEndpoints](/reference/api/typescript/aspire.hosting/iresourcewithendpoints.md) -- `interface`
