cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Odata model : invalid HTTP status code 501

Ajit_K_Panda
Product and Topic Expert
Product and Topic Expert
0 Likes
809

Hi Experts,

I am trying to develop an application where Customer details should be shown in a table using OData model. But it is giving error as shown in below screenshot:

Please check the below code and help me in resolving this.

Create Content Method of the View:


onInit method of controller:

Thanks in advance..

Accepted Solutions (0)

Answers (2)

Answers (2)

junwu
SAP Champion
SAP Champion
0 Likes
Ajit_K_Panda
Product and Topic Expert
Product and Topic Expert
0 Likes

hi Jun,

Can you explain what does this extension do ?

Need details.

Thanks anyway.

pinakipatra
Contributor
0 Likes

Hi ,

are you running this from eclipse?

Ajit_K_Panda
Product and Topic Expert
Product and Topic Expert
0 Likes

Yes.
Using Run as --> Web App Preview.

pinakipatra
Contributor
0 Likes

Hi ,

You can disable the chrome security so that it will not throw an CORS error.

You can do it by running  (Windows btn + R)  chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security

Ajit_K_Panda
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Pinaki,

Thanks for the help. After doing this i am getting below error. Can you help ? and also can you explain how web security is causing issue? Want to understand.

pinakipatra
Contributor
0 Likes

Hi ,

Chrome blocks all the request from cross origin until unless it has the respective headers.

http://stackoverflow.com/questions/20035101/no-access-control-allow-origin-header-is-present-on-the-...

Usually the get request should work after you disable the web security.

Not sure why it is not working .

I will look into it.