question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: how to change ODataV4 batch request IEEE754Compatible

See original GitHub issue

Greetings,

this is not a bug but a question regarding how to change ODataV4 batch request IEEE754Compatible. Please forgive me if this is not the right place to ask questions.

I am using SAPUI5 1.95.0 (not openui5) OData V4 with SAP/CAP in batch mode and found out that countdistinct is returning result as String type instead of Int64 type. This is because UI5 set http header Accept to IEEE754Compatible=true in batch mode. This is defined by the OData protocol.

Is there a way to set IEEE754Compatible=false?

Many thanks!

What I’ve tried and failed:

  1. Manually override Accept header in manifest.json like below
{
	"sap.ui5": {
		"models": {
			"": {
				"settings": {
					"httpHeaders": {
						"Accept": "application/json;charset=UTF-8;IEEE754Compatible=false"
					}
				}
			}
		}
	}
}
  1. Set OData system query option $format when binding using method bindList

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
1110101commented, Dec 29, 2021

Hi @shawgum,

currently there is no way to override or change the accept header. I will discuss this with my colleagues and see what can be done here. This won’t happen until mid of January, as most of the colleagues are on vacation.

Regards, Oliwer

0reactions
ThomasChadzelekcommented, Jan 6, 2022

Hello Gang!

Thanks for the explanation. Case closed 😃

Best regards, Thomas

Read more comments on GitHub >

github_iconTop Results From Across the Web

Batch operation in in OData V4 Adapter in SAP Cloud ...
For Data Retrieval requests you can click on “Add Batchset” to add batchset. For You can add more ChangeSetParts to a ChangeSet using...
Read more >
OData JSON Format Version 4.01 - OASIS Open
The IEEE754Compatible=true format parameter indicates that the service MUST serialize Edm.Int64 and Edm.Decimal numbers (including the count, if requested) ...
Read more >
Advanced Tutorial · OData - the Best Way to REST
Batch requests allow grouping multiple operations into a single HTTP request payload. The Batch request below contains the following operations in order listed:...
Read more >
Part 8: Batch Request Support - Apache Olingo Library
The content of batch requests can consist of a series of individual requests and Change Sets, each represented as a distinct MIME part....
Read more >
Data services - OData - Creatio Academy
The information contained herein is subject to change without notice and is ... Batch request (Content-Type: multipart/mixed and different sets of requests).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found