POST method doesn’t see token #271
Replies: 1 comment
-
@malogajski yup, there is support for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a issue when using the POST method. It looks to me like the api token is not being passed. However if I change to GET everything works as expected.
I tested with Postman and everything works in every variant. I also tried to remove the api token from postman and then I got the same result as when I test through the documentation with the POST method, which is that it redirects me to the login frontend page.
I'm not sure if I overlooked something or if this is a bug?! Please check example:
API routes:
Store function from controller:
Solution above works, but if I change "create" endpoint to POST api token not available when checking via documentation. Of course it works with Postman, even if route endpoint for both method are same but with different methods:
Edit:
I see the point. With GET, parameters are "query" type, and with POST they are "body". So what I need here is an annotation for the parameters in order to set them as a query since api token is in both cases as "query" parameter.
Beta Was this translation helpful? Give feedback.
All reactions