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

POST with json file #8

Open
gokcesurenkok opened this issue Jan 24, 2017 · 2 comments
Open

POST with json file #8

gokcesurenkok opened this issue Jan 24, 2017 · 2 comments

Comments

@gokcesurenkok
Copy link

gokcesurenkok commented Jan 24, 2017

Hi,
When I send a POST request with a json file in a given path, json file is parsed as hash, that causes problem at RestClient side.

You need to modify @Body with @body.to_json , otherwise it returns 415 as response code

when 'json' @body = JSON.parse File.read(path) **@body = @body.to_json** else

@hidroh
Copy link
Owner

hidroh commented Jan 24, 2017

Hi wanna send a PR? I'll merge soon as I can :)

@kevgatch
Copy link

Also encountering this same issue. You can also fix it by:

@Body = JSON.dump(JSON.parse File.read(path))

kevgatch added a commit to kevgatch/cucumber-api that referenced this issue Sep 12, 2017
-Add a custom step to clear cache on demand from feature file
-POST with json file
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

3 participants