Quantcast
Channel: SCN : All Content - SAP Gateway
Viewing all articles
Browse latest Browse all 2823

OData metadata - Breeze.js expects JSON

$
0
0

Hi,

 

We are trying to use the Breeze javascript library to work with OData served by Gateway. 

 

We define our dataservice as OData, but when we do a call to metadataStore.FetchMetadata, the Accept header is set to application/json and so the service returns a 406.  If we post the same URL into the browser (or use Postman), the XML data is successfully returned, as the broswer's default Accept header contains application/xhtml+xml.

 

Does anyone know how to get round this?  We cannot find a way of getting Breeze to change the request's Accept header (particularly just for the metadata request) and Gateway does not seem to support JSON metadata yet.

 

Many thanks,

 

Andrew


Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>