Skip to Content
0

IOS SAP Odata SDK

Aug 09, 2017 at 12:30 PM

17

avatar image
Former Member

Hello.

Im using oData connector in IOS templete project, generated by SAP Cloud Platform and everything seems to be working fine but im geting error as i trying to get some data:

the format of value 'application/json odata=verbose' is invalid

So my data source cant send me data with verbose, so im trying to send httpheaders before query like this:

let httpHeaders = SAPOData.HTTPHeaders() 
httpHeaders.setHeader(withName: "Accept-Language", value: "US")
httpHeaders.setHeader(withName: "Accept-Type", value: "application/json")
 return try CatalogGoods.array(from: self.executeQuery(query.from(EnterpriseV8Metadata.EntitySets.catalogGoods),headers: httpHeaders).entityList() 

But still getting the same error, is theare any way to change Accept-Type to get data in just application/json

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers