$darkmode

| Qore Sap4HanaRestClient Module Reference 1.1

Sap4HanaRestClient Module

# Sap4HanaRestClient Introduction

The Sap4HanaRestClient module provides an API for calling REST services with SAP S/4Hana servers.

To use this module, use `"%requires Sap4HanaRestClient"` in your code.

All the public symbols in the module are defined in the Sap4HanaRestClient namespace.

The main classes are:

- Sap4HanaRestClient: this class provides the REST client API for communuication with SAP S/4Hana's REST API; it also automates authentication and authorization to the target
- Sap4HanaRestConnection: provides a REST connection object to a SAP S/4Hana server (based on the ConnectionProvider module)

Example:
  #!/usr/bin/env qore
  %new-style
  %strict-args
  %require-types
  %enable-all-warnings
  %requires Sap4HanaRestClient
  hash<auto> opts = (
  "url": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap",
  "apikey": ENV.SAP4HANA_API_KEY,
  );
  Sap4HanaRestClient rest(opts);
  hash<auto> ans = rest.get("API_BUSINESS_PARTNER/A_AddressEmailAddress?%24top=1");
  printf("%N\n", ans.body);
  printf
  string printf(string fmt,...)

# Release Notes

## Sap4HanaRestClient v1.1

- implemented support for a data provider scheme cache and rich option information for connections (issue 4025)

## Sap4HanaRestClient v1.0

- the initial version of the Sap4HanaRestClient module