In order to get info using OData, we need to download and build
– https://www.odata.org/libraries/#cpp –>> https://github.com/OData/odatacpp-client
and
– CPPREST library – https://github.com/Microsoft/cpprestsdk (known as Casablanca) – vcpkg shows v2.1.19
ODataCpp-Client serves as client and client side proxy generation (code gen) aspects of OData.
#pragma comment(lib, “odata_cleint.vs12d.lib”)
#pragma comment(lib, “cpprest143d_2_1”)
or
UPD: I have packed newest cpprestsdk.2.1.19 into nuget package (but as cpprestsdk.2.1.0.nuget & v143) ‘cause odatacpp required it.
The archive also contains cpprest143d_2_1_win32.lib & cpprest143d_2_1_x64.lib (MSVC v143 — VS2022 x64/x86)
Download: cpprestsdk.2.1.19.nupkg.cab
Added multipart/mixed; boundary=batch header.
Requested URI: /sap/opu/odata/sap/yinfosatz/$batch
no: /sap/opu/odata/sap/mein-dienst/$record
(test variant: /sap/opu/odata/sap/yinfosatz/recordSet(210, “TEST”))
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
--batch Content-Type: multipart/mixed; boundary=changeset --changeset Content-Type: application/http Content-Transfer-Encoding: binary POST recordSet HTTP/1.1 Content-Type: application/atom+xml;type=entry Content-Length: 1000 dataserviceversion: 2.0 <?xml version="1.0" encoding="utf-8"?> <entry xml:base="http://sapondev100.sap.sd/sap/opu/odata/sap/yinfosatz/" xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"> <id>http://sapondev100.sap.sd/sap/opu/odata/sap/yinfosatz/recordSet(92,'a123')</id> <title type="text">recordSet(72,'sc23')</title> <updated>2000-01-01T01:01:01Z</updated> <category term="yinfosatz.record" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> <link href="recordSet(52,'f23')" rel="self" title="record"/> <content type="application/xml"> <m:properties> <d:Index>43</d:Index> <d:KSCHL>unas</d:KSCHL> </m:properties> </content> </entry> --changeset-- Content-Type: application/http Content-Transfer-Encoding: binary POST recordSet HTTP/1.1 Content-Type: application/xml Content-Length: 1000 <?xml version="1.0" encoding="utf-8"?> <entry xml:base="http://sapondev100.sap.sd/sap/opu/odata/sap/yinfosatz/" xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"> <id>http://sapondev100.sap.sd/sap/opu/odata/sap/yinfosatz/recordSet(32,'23')</id> <title type="text">recordSet(62,'235')</title> <updated>2017-12-13T09:59:43Z</updated> <category term="yinfosatz.record" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> <link href="recordSet(12,'230')" rel="self" title="record"/> <content type="application/xml"> <m:properties> <d:Index>4</d:Index> <d:KSCHL>nas</d:KSCHL> </m:properties> </content> </entry> --changeset-- --batch-- |
UPD: