SAP / cloud-sdk

The SAP Cloud SDK documentation and support repository.
https://sap.github.io/cloud-sdk/
Apache License 2.0
45 stars 42 forks source link

Usage of "Generic HTTP Client" for Javascript is not mentioned properly #454

Closed Penna123 closed 2 years ago

Penna123 commented 3 years ago

Hello With VDMs, it is easy to access a ODATA service. We need to use a C4C Api for which there is no such VDM. https://api.sap.com/api/lead/overview

Also, we dont want to generate OData client as we need it for just creating lead for which we have to have entire odata client in our codebase. And keep on updating if the API is changed. Also the ownership of API belongs to C4C and we are part of different LOB.

Other option would be to use "Generic HTTP Client" which is not mentioned clearly in documentation. https://sap.github.io/cloud-sdk/docs/js/features/connectivity/generic-http-client Usage of ODataClient and generating one is mentioned, but we would like to go with "Generic HTTP Client" whose usage is not clear (or) please let us know anyother better option. Kindly point out to source code where it is used and update the same in documentation also. Thanks!! Leela

marikaner commented 3 years ago

Hey @Penna123, as clarified in a quick call your usage was almost correct. After correcting it, it seems that you have a problem down the line. @jjtang1985 The documentation states: "The destination argument is either a full destination object you have already fetched or an object containing a destination name and JWT.", which could be understood as JWT is mandatory. I guess we could clarify the language here.

jjtang1985 commented 3 years ago

Hi @Penna123 ,

I improved the doc via this #457 . Maybe you can have a look. @marikaner FYI.

artemkovalyov commented 2 years ago

The fix is there. Let's us know if we can help with anything else.