Skip to Content
avatar image
Former Member

IOS SAP Odata SDK

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers