Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http Assertions does not allow the creation of a body #925

Open
ihulsbus opened this issue Apr 16, 2020 · 8 comments
Open

Http Assertions does not allow the creation of a body #925

ihulsbus opened this issue Apr 16, 2020 · 8 comments

Comments

@ihulsbus
Copy link

@ihulsbus ihulsbus commented Apr 16, 2020

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,

@mvdkleijn
Copy link
Collaborator

@mvdkleijn mvdkleijn commented Apr 24, 2020

We feel that it's reasonable to want to be able to set the body in certain cases. If you'd like to help out, feel free to open a PR.

@gohargasparyan
Copy link
Contributor

@gohargasparyan gohargasparyan commented Apr 29, 2020

Hi @mvdkleijn , I just made changes for the issue, tried to push to a new branch and got 403, do I need some permissions to make PR?

@mvdkleijn
Copy link
Collaborator

@mvdkleijn mvdkleijn commented Apr 29, 2020

Hi @mvdkleijn , I just made changes for the issue, tried to push to a new branch and got 403, do I need some permissions to make PR?

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!

@gohargasparyan
Copy link
Contributor

@gohargasparyan gohargasparyan commented Apr 29, 2020

Yeah first time trying to contribute to open source, thanks, it helps :)

@mvdkleijn
Copy link
Collaborator

@mvdkleijn mvdkleijn commented Apr 29, 2020

Yeah first time trying to contribute to open source, thanks, it helps :)

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. 👍

@gohargasparyan
Copy link
Contributor

@gohargasparyan gohargasparyan commented Apr 29, 2020

No worries, it was straight forward. #938

@fazypng
Copy link

@fazypng fazypng commented Jan 22, 2021

@mvdkleijn hi i need help. very much help. i just joined the Github community yesterday and i don't understand a single thing I've been reading here 😩

@mvdkleijn
Copy link
Collaborator

@mvdkleijn mvdkleijn commented Jan 22, 2021

@mvdkleijn hi i need help. very much help. i just joined the Github community yesterday and i don't understand a single thing I've been reading here 😩

I'm not sure what exactly your question is that I could help with...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants