Skip to content

Custom Host header is not included in cURL and HTTPie request snippets #258

@mle-enso

Description

@mle-enso

Due to a rather uncommon domain design of our platform we depend at least for fallback reasons on host header information.

While documenting of host header information is no problem like shown here…

given(getRequestSpec())
                .config(RestAssuredConfig.config().redirect(RedirectConfig.redirectConfig().followRedirects(false)))
                .when()
                .filter(document("host-header",
                        requestHeaders(
                                headerWithName("Host").description("An alternative way to point to a sub-domain"))
                        ))
                .header("Host", "www.host.tld")
                .get("/endpoint")
                .then()
                .statusCode(301);

…the host header documentation exists in http-request.adoc but not in curl-request.adoc.

I've found org.springframework.restdocs.cli.CliOperationRequest which explicitly excludes the host header from the documented CLI (curl) output.

The question is: Is there any possibility to configure the headers which should be excluded from being documented in curl-request.adoc?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions