# withExternalServiceHttpHealthCheck

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Version: `13.2.0`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire)

Adds an HTTP health check to an external service

## Definition

```typescript
interface ExternalServiceResource {
  // ... omitted for brevity
  withExternalServiceHttpHealthCheck(
    path?: string,
    statusCode?: number): ExternalServiceResource
}
```

## Parameters

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

## Returns

[ExternalServiceResource](/reference/api/typescript/aspire.hosting/externalserviceresource.md) `builder`

## Applies to

- [ExternalServiceResource](/reference/api/typescript/aspire.hosting/externalserviceresource.md)
