# YarpRoute.WithMatch

- Module: [Aspire.Hosting.Yarp](/reference/api/go/aspire.hosting.yarp.md)
- Defined on: [YarpRoute](/reference/api/go/aspire.hosting.yarp/yarproute.md)
- Version: `17.0.0`
- Kind: `method`

Set the parameters used to match requests.

## Definition

```go
type YarpRoute interface {
    // ... omitted for brevity
    WithMatch(match *YarpRouteMatch) YarpRoute
}
```

## Signature

```go
WithMatch(match *YarpRouteMatch) YarpRoute
```

## Parameters

- `match` ([`*YarpRouteMatch`](/reference/api/go/aspire.hosting.yarp/yarproutematch.md))

## Returns

[`YarpRoute`](/reference/api/go/aspire.hosting.yarp/yarproute.md)

Returns a handle; failures surface later via `Err()`.

## Defined on

- [YarpRoute](/reference/api/go/aspire.hosting.yarp/yarproute.md) -- `handle`
