envoyproxy / envoyproxy/nighthawk

Add more echo responders to test server filter ResponseOptions.

Open
#351 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
414
Forks
95
Avg merge
2d 9h
Merged PRs (30d)
11

Description

This is a follow-up to comments on #338 which has added `echo_request_headers` to the test server filter `ResponseOptions`.

I'd like to add more response options that I think might be useful:

* `echo_request_metadata` - include the dump of request metadata in the response body
* `echo_request_body` - include the body of `POST` request in the response body
* `status_code` - set http status code to arbitrary value, like `204` or `302`

@htuch has suggested that we might want to eventually have a more structured body. E.g. make it a proto defined JSON format or something like that.

I think that makes sense, and I'd like to have more input.

- Should echo response be included into response body or special response headers? I think that including response in headers are nice because they could be stripped automatically AND are easily parsed. E.g. `x-echo-request-headers: { some_headers_dump }`.

- What format do we want structured response to use? Arbitrary JSON? Some specifically defined proto? Something else?

Any other ideas / suggestions?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.