Skip to content

net/http/httptest: add helper to create a server requests #14199

@bradfitz

Description

@bradfitz

It's a pain to create an *http.Request for use with httptest.Server handlers. http.NewRequest is almost right but is for for outbound requests, not inbound requests. The correct way is http.ReadRequest which requires a bufio.Reader. Let's add a helper func to httptest.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions