microsoft / dev-proxy

Dev Proxy is an API simulator that helps you effortlessly test your app beyond the happy path.
https://aka.ms/devproxy
MIT License
457 stars 53 forks source link

Generate .http file from intercepted requests #780

Closed waldekmastykarz closed 3 weeks ago

waldekmastykarz commented 1 month ago

Similarly to how we generate OpenAPI specs from intercepted requests, we should generate .http files. These files contain API requests that are issued by the app.

Rationale

Having .http files allows developers to easily test specific API calls used in their app.

Considerations

The generated .http file shouldn't store tokens or keys. If Dev Proxy detects a token or a key, it should replace them with a variable that can be set in the file. Variables should be defined per API-header/-query string param pair.