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

Add id for endpoint to request #85

Closed
m1h43l opened this issue Jul 31, 2020 · 1 comment
Closed

Add id for endpoint to request #85

m1h43l opened this issue Jul 31, 2020 · 1 comment
Assignees

Comments

@m1h43l
Copy link
Collaborator

m1h43l commented Jul 31, 2020

Currently it is not possible in a plugin to identify which endpoint/route is serving the request. It would be nice to be able to add an identifier to the il_addRoute function and add that to the request data structure so that the plugin can access it and act dynamically to that value.

Use case: Have a plugin that adds CORS header corresponding to the endpoints used based on a provided configuration.

@m1h43l m1h43l self-assigned this Aug 2, 2020
@NielsLiisberg
Copy link
Collaborator

Routing now allows parameter:

il_addRoute(config : %paddr(test1) : IL_ANY : '/simpletest/{myId}/list/{myNum
Look in examples routeparms.rpgle

@m1h43l m1h43l mentioned this issue Aug 23, 2020
@m1h43l m1h43l closed this as completed Aug 24, 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