cancel
Showing results for 
Search instead for 
Did you mean: 

IOS SAP Odata SDK

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (0)