c# - http.post does not set content-type header anuglar 2 -


i send small post request c# backend, example requests works postman server seams configure right (when include content-type header "application/json" works, otherwise 415 option error)

this code use call:

   public sendexportcontainerlist(containers: container[], recipient: string) {      let headers = new headers({ "content-type": "application/json" });     let options = new requestoptions({ headers: headers });        return this.http.post("this.customizingurl + "/api/container/exportloadinglist", '', options).subscribe(i => {         console.log(i);     }); } 

the error getting an: options http://localhost:62262//api/container/exportloadinglist 415 (unsupported media type)

that sounds content-type not set correctly, can't figure out whats different postman request. tried plenty of other solutions without success.

thanks answers.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -