Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8509

Re: Error while using oData update (415 Unsupported Media Type Error)

$
0
0

>The content type for request header is only application / json and this seems to be creating the problem. Please let me know how I can override the content type.

 

I never set the content type in the constructor of the model as you have.  I set it explicitly right before each update function call and that works. 

 





oModel.setHeaders({"content-type" : "application/json;charset=utf-8"});







oModel.update("/Users('"+oEntry.PERS_NO+"')", oEntry, oParams);



Viewing all articles
Browse latest Browse all 8509

Trending Articles



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