testify: Http Assertions does not allow the creation of a body
Hi,
It seems like the HTTP Assert package does not allow me to specify a body to pass in a POST request for example. Looking at the HTTPBody() function, the body argument is set to nil:
req, err := http.NewRequest(method, url+"?"+values.Encode(), nil)
Is this by design, or am I looking at a missing feature?
Cheers,
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 24 (9 by maintainers)
Yeah first time trying to contribute to open source, thanks, it helps π
@myusko Looks like the linked PRβs comments are still not addressed.
Yes. The request raised in this issue is still not satisfied.
Based on my understanding of reading the comments on this issue and the PR, it looks like the PR was raised with
v2in mind. But that might not be happening. So, the next logical step for this would be to follow either suggestion βbβ or βcβ in this comment. βcβ being the best case scenario.No worries, feel free to ask more if desired. The Github docs also provide a lot of information on how to do things.
Once you have the PR in place, Iβll take a look and see if anything needs adjustment and once satisfied all looks good, we can merge it. π
This sounds like youβre new or perhaps Iβm misunderstanding? π
The way you create a PR is by forking the repository to your own copy, create a branch with your changes pushed to it and then use the Github UI to create the PR. Basically that will be a request for us to merge changes from your fork into our original copy.
It sounds like you were trying to push to a branch in the main Testify repository which is indeed off limits to all but the maintainers.
Hope that helps!