# HttpMethodTransformExtensions Methods

- Package: [Aspire.Hosting.Yarp](/reference/api/csharp/aspire.hosting.yarp.md)
- Type: [HttpMethodTransformExtensions](/reference/api/csharp/aspire.hosting.yarp/httpmethodtransformextensions.md)
- Kind: `Methods`
- Members: `1`

Extensions for modifying the request method.

## WithTransformHttpMethodChange(YarpRoute, string, string)

- Name: `WithTransformHttpMethodChange(YarpRoute, string, string)`
- Modifiers: `extension`
- Returns: [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Yarp/ConfigurationBuilder/Transforms/HttpMethodTransformExtensions.cs#L20-L21)

Adds the transform that will replace the HTTP method if it matches.

```csharp
public static class HttpMethodTransformExtensions
{
    public static YarpRoute WithTransformHttpMethodChange(
        this YarpRoute route,
        string fromHttpMethod,
        string toHttpMethod)
    {
        // ...
    }
}
```

## Parameters

- `route` ([YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md))
- `fromHttpMethod` (`string`)
- `toHttpMethod` (`string`)

## ATS metadata

### ATS export

- Available to Polyglot AppHosts through the Aspire Type System.
