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

Request context "method" value regression #679

Open
movinfinex opened this issue Feb 5, 2025 · 2 comments
Open

Request context "method" value regression #679

movinfinex opened this issue Feb 5, 2025 · 2 comments
Assignees
Labels

Comments

@movinfinex
Copy link
Contributor

With this config:

---
plugin: rest
resources:
- path: "/method"
  method: get
  response:
    scriptFile: script.js

and this script file:

respond().withContent(JSON.stringify(context.request.method));

the response is "GET" until v4.2.4, but starting with v4.3.0 it's {}.

@outofcoffee outofcoffee added the bug label Feb 5, 2025
@outofcoffee
Copy link
Owner

Hi @movinfinex, thank you for raising this.

The serialisation issue for context.request.method is resolved in v4.5.7.

Please let us know if this works for you.

@movinfinex
Copy link
Contributor Author

Thanks for the quick fix!

I've tried v4.5.7 with our hurl-based tests, and context.request.method looks good now, but it looks like there's a similar problem with context.request.body. I think that's the last thing making our tests red, though.

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

No branches or pull requests

2 participants