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

RFC - accept response by ignore the body #2

Closed
missedone opened this issue Feb 21, 2016 · 2 comments
Closed

RFC - accept response by ignore the body #2

missedone opened this issue Feb 21, 2016 · 2 comments

Comments

@missedone
Copy link
Collaborator

hi @eriklupander

for now, gotling only support accept: json, for some case, i'd like to get the response, read the body but just simply ignore the data.
so, could you add support of this, for example, if we don't specify accept in the spec, then behavior as read body but ignore?

actually, i'd like to try to contribute PR if you think this is valid requirement.
thanks

@eriklupander
Copy link
Owner

I think having accept: json but not specifying a jsonpath will read the body without doing anything with it. Should be easy to modify to a better behaviour.

I added you as contributor. Feel free to push :)

eriklupander added a commit that referenced this issue Feb 25, 2016
feature #2: allow empty or nil accept header in test spec
@missedone
Copy link
Collaborator Author

right, as in PR #2, now accept is optional in test spec, which is default to 'text/html,application/json,application/xhtml+xml,application/xml,text/plain' if no value specified.
the json parse only happens when 'jsonpath' triggered for response.

eriklupander pushed a commit that referenced this issue Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants