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

HTTP OPTIONS verb not supported by Agent #486

Open
mnoomnoo opened this issue Sep 1, 2024 · 0 comments
Open

HTTP OPTIONS verb not supported by Agent #486

mnoomnoo opened this issue Sep 1, 2024 · 0 comments
Labels

Comments

@mnoomnoo
Copy link
Contributor

mnoomnoo commented Sep 1, 2024

I’ve been building an web based asset tool using React and the Axios HTTP library. GET and POST requests sent to the Agent work without issue. When I try to delete an asset using the DELETE verb I get the following error from the agent logs:

  • [info] SessionImpl::requested: ReST Request: From [127.0.0.1:47374]: OPTIONS /asset/testTask
  • [warning] SessionImpl::requested->Session::fail: Operation failed: 127.0.0.1: Cannot find handler for: OPTIONS /asset/testTask
  • [debug] SessionImpl::requested->Session::fail: Returning error INVALID_REQUEST: 127.0.0.1: Cannot find handler for: OPTIONS /asset/testTask

When I look at the browser logs I see the following:
XHR OPTIONS http://localhost:5000/asset/newTask CORS Preflight Did Not Succeed

It seems that the Agent doesn’t support the OPTIONS verb for the CORS preflight when attempting to use the DELETE verb. I tried the javascript fetch function to see if the issue was being caused by Axios, but the result is the same.

I have this in my Agent config:

"HttpHeaders": {
  "Access-Control-Allow-Origin": "*",
  "Access-Control-Allow-Methods": "*",
  "Access-Control-Allow-Headers": "Accept"
},
@mnoomnoo mnoomnoo changed the title HTTP delete request from browser fails HTTP OPTIONS verb not supported by Agent Sep 14, 2024
@wsobel wsobel added the feature label Sep 25, 2024
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