Skip to content

Add a "record" option to proxy helper #252

@dagardner-nv

Description

@dagardner-nv

Is your feature request related to a problem? Please describe.
It would be nice to be able to add a "record" option to the proxy helper.

The idea would be to use a {{#proxy}} to record responses from an external/live service, to generate mock files to be used later in tests.

Specifically the service that I am most often attempting to mock (https://github.com/triton-inference-server) returns data in a binary format that is large and difficult to produce by hand.

Describe the solution you'd like

HTTP/1.1 200 OK

{{#proxy}}
{
    "target": "http://other-server:9008",
    "record_path": "./recorded_mocks/GET_{{now}}.mock
}
{{/proxy}}

Describe alternatives you've considered
Currently I use a modified client that logs responses to file

Additional context
N/A

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions