-
Seems to work fine with the |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Can you post the full code you are using? probably doing something wrong? |
Beta Was this translation helpful? Give feedback.
-
Server (not working):
Server (working):
Client:
|
Beta Was this translation helpful? Give feedback.
-
Okay - Not sure what I was doing wrong but seems to be working fine now :| Thanks for the help! I will close this now. |
Beta Was this translation helpful? Give feedback.
-
I will leave this comment here in case someone runs into a similar issue. I was testing my API through an application served on a different port (both localhost), this made it a cross site request. Cross site requests get processed into two calls an options call to ensure the server accepts the type of request you're trying to make and then the actual call you intended to make. In order to to use non get/post routes I had to setup an Hope that helps! |
Beta Was this translation helpful? Give feedback.
I will leave this comment here in case someone runs into a similar issue.
I was testing my API through an application served on a different port (both localhost), this made it a cross site request.
Cross site requests get processed into two calls an options call to ensure the server accepts the type of request you're trying to make and then the actual call you intended to make.
In order to to use non get/post routes I had to setup an
.options
route to with the appropriateAccess-Control-Allow-Origin
andAccess-Control-Allow-Methods
.Hope that helps!