# IResourceWithEndpoints.withHttpHealthCheck

- 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 a health check to the resource which is mapped to a specific endpoint.

## Definition

```typescript
interface IResourceWithEndpoints {
  // ... omitted for brevity
  withHttpHealthCheck(
      path?: string,
      statusCode?: number,
      endpointName?: string): IResourceWithEndpoints;
}
```

## Signature

```typescript
withHttpHealthCheck(
    path?: string,
    statusCode?: number,
    endpointName?: string): IResourceWithEndpoints
```

## Parameters

- `path` (`string`) `optional`
- `statusCode` (`number`) `optional`
- `endpointName` (`string`) `optional`

## Returns

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

## Defined on

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