Developed web application where making ajax call to PI Web API as below. PI Web API configuration is set to basic authentication, hence I am passing credentials as required.
Here I tried by adding headers also like:
'Access-Control-Allow-Methods':'GET, POST, PATCH, PUT, DELETE, OPTIONS'
But I got the this kind of response :
Here is my Pi configuration :
Please suggest for same.
Now I Made the changes and this is a new server machine still the same error occured... please Help.
"No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 401."