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"
},
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/testTaskWhen I look at the browser logs I see the following:
XHR OPTIONS http://localhost:5000/asset/newTask CORS Preflight Did Not SucceedIt 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: