on 2020 Aug 19 4:29 PM
Hello Experts,
I have created a table in my DB module. In my NodeJs module I have one xsodata as follows:
service {
"tinyworld.tinydb::myview" as "euro" keys generate local "ID";
}
This xsodata exposes my table data as a OData service. I have one UI module on top of this nodeJS module and using app routers I am calling the OData service using my UI module.
The issue is when I am triggering it using my browser(Chrome or any other), it works fine. I gives me expected result. But when I am tring to trigger the OData service using Postman Tool, it returns success code 200, but the response is as follows which is not expected:
<html>
<head>
<link rel="shortcut icon" href="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" />
<script>
document.cookie="fragmentAfterLogin="+encodeURIComponent(location.hash)+";path=/";document.cookie="locationAfterLogin="+encodeURIComponent(location.href.split('#')[0].split(location.host)[1])+";path=/";document.cookie="signature=ElU1Fx%2BP8OoEz4v%3D;path=/";location="https://uaa-server.xsa.<mysystemhostname>:30033/uaa-security/oauth/authorize?response_type=code&client_id=sb-tinyworld46f03587-665b-4a6e-b047-d6b494a6f32e&redirect_uri=https%3A%2F%2F2o8kdhc7zzcw8mgyld-master-tinyui1.<mysystemhost>%3A30033%2Flogin%2Fcallback"
</script>
</head>
</html>
This is a HTML page but I want to receive the OData service response. Could you please suggest me what is to be done?
Thank you.
Best Regards,
Ajinkya Jadhav
Request clarification before answering.
The HTML response you get is the redirection to the Login endpoint.
You have to get an OAuth access token upfront and provide it when you call the OData service.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here you can find one option to get a token: https://blogs.sap.com/2018/08/31/how-to-get-an-access-token-from-the-xsuaa-service-for-external-api-...
User | Count |
---|---|
50 | |
9 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.