# ODataRequest

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.Sap/tree/main/Frends.Sap.ODataRequest>

{% tabs %}
{% tab title="Parameter: Input" %}

| Name                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Method : `Method`        | <p>The HTTP Method to be used.</p><p>Possible values:</p><ul><li><code>GET</code>:</li></ul><p>The HTTP Method to be used.</p><ul><li><code>POST</code>:</li></ul><p>The HTTP Method to be used.</p><ul><li><code>PUT</code>:</li></ul><p>The HTTP Method to be used.</p><ul><li><code>PATCH</code>:</li></ul><p>The HTTP Method to be used.</p><ul><li><code>DELETE</code>:</li></ul><p>The HTTP Method to be used.</p><ul><li><code>HEAD</code>:</li></ul><p>The HTTP Method to be used.</p><ul><li><code>OPTIONS</code>:</li></ul><p>The HTTP Method to be used.</p><ul><li><code>CONNECT</code>:</li></ul><p>The HTTP Method to be used.</p><p><br>Default: <code>0</code><br>Example: <code>GET</code></p> |
| HostAddress : `String`   | <p>Host address.</p><p><br>Default: <code><https://example.com></code><br>Example: <code><https://example.com></code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Port : `Int32`           | <p>Port to connect.</p><p><br>Default: <code>44301</code><br>Example: <code>44301</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ServiceName : `String`   | <p>Service name.</p><p><br>Default: <code>FAP\_APPROVEBANKPAYMENTS\_SRV</code><br>Example: <code>PAYMENTS</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| EntitySetName : `String` | <p>Entity set name.</p><p><br>Default: <code>C\_AbpPaymentBatch</code><br>Example: <code>A\_Set</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| QueryString : `String`   | <p>Query string part of the request.</p><p><br>Default: <code>-</code><br>Example: <code>$skip=1&$paramAbc=valueXyz</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Format : `Format`        | <p>The format for communication.</p><p>Possible values:</p><ul><li><code>JSON</code>:</li></ul><p>The format for communication.</p><ul><li><code>XML</code>:</li></ul><p>The format for communication.</p><p><br>Default: <code>0</code><br>Example: <code>JSON</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Message : `String`       | <p>The message text to be sent with the request.</p><p><br>Default: <code>-</code><br>Example: <code>{ "Body": "Message" }</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| {% endtab %}             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

{% tab title="Parameter: Options" %}

| Name                             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Username : `String`              | <p>Username used to connect with Basic Auth.</p><p><br>Default: <code>-</code><br>Example: <code>user1</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| 🗝Password : `String`            | <p>Password used to connect with Basic Auth.</p><p><br>Default: <code>-</code><br>Example: <code>password123</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| AcceptAnyCertificate : `Boolean` | <p>Option suppress RemoteCertificateValidationCallback, which accepts any certificate.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Policies : `String[]`            | <p>Use when your system's default cipher set does not include SAP ciphers by default, for example on Linux with</p><p>OpenSSL 1.1.1 default installation.</p><p>The full list of supported values can be found on <https://learn.microsoft.com/en-us/dotnet/api/system.net.security.tlsciphersuite>.</p><p>The availability of the ciphers depends on the exact operating system and the .NET version.</p><p>For a list of supported ciphers on your system, you can use the following PowerShell command:</p><p>(Get-TlsCipherSuite).Name</p><p><br>Default: <code>-</code><br>Example: <code>\[ "TLS\_RSA\_WITH\_AES\_256\_CBC\_SHA", "TLS\_RSA\_WITH\_AES\_128\_CBC\_SHA" ]</code></p> |
| FetchCsrfToken : `Boolean`       | <p>Whether to fetch CSRF token from the SAP before making the request.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| {% endtab %}                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

{% tab title="Result: Result" %}

| Name                 | Description                                                        |
| -------------------- | ------------------------------------------------------------------ |
| StatusCode : `Int32` | <p>Returned status code.<br>Example: <code>200</code></p>          |
| Data : `String`      | <p>Body of the response<br>Example: <code>{ "id": 123 }</code></p> |
| {% endtab %}         |                                                                    |
| {% endtabs %}        |                                                                    |
