1

My hosting provider does not accept the 'Options' verb when sending a odata.read request using datajs.

Doesn't work:

OPTIONS http://odata.resporter.tv/odata/timelines HTTP/1.1
Accept: */*
Origin: http://*******.***
Access-Control-Request-Method: GET
Access-Control-Request-Headers: accept, maxdataserviceversion
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)
Host: ****.*******.**
Content-Length: 0
DNT: 1
Connection: Keep-Alive
Pragma: no-cache

Works:

Accept: */*
Origin: http://******.**
Access-Control-Request-Method: GET
Access-Control-Request-Headers: accept, maxdataserviceversion
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)
Host: ****.********.**
Content-Length: 0
DNT: 1
Connection: Keep-Alive
Pragma: no-cache

Notice the 'OPTIONS' header in the request that doesnt work.

Does somebody know if i can not send the 'options' header using datajs?

1 Answer 1

2

it's your browser which sends the options header because of CORS. Either you can use jsonp or host your html where your host your data endpoint

1
  • Thanks! The hosting provider changed it's config and after that it worked! Jul 30, 2015 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.