Skip to content

How to add support for request.GetBody? #258

@boekkooi-impossiblecloud

Description

Good morning/afternoon/evening/night.

At the moment I'm writing some end to end tests using validator.Validator.ValidateHttpRequestResponse and the library works very nicely!
However, I noticed that the requests body validator kept failing unless I reset the request body to the start position.

Now I was wondering if/how to best add support for Request.GetBody to avoid the issue of an already read request.Body.
I think my primary question is should I avoid any BC breaks in a PR or are we fine returning for example an error from Request.GetBody? Similar I'm not sure what to do with the request.Body assignments as these currently don't change the request.GetBody, do you have any suggestions?

Thanks for taking the time to checkout this issue and maintaining this library!
Have a great day 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions