Passing a JSON via POST to ASP.NET API with IONIC 3

0

I need to make a post request with Ionic 3, but I have no positive result.

By Postman I can do more with Ionic, but the API is ASP.NET and does not accept 'OPTIONS' so it would have to be a different method.

Code:

postRequest(){   

    let body = {
    "IdSolicitacao": 0,
    "IdUsuarioOrigem": 1,
    "IdUsuarioDestino": 3,
    "Status": 10,
    "data": "2018-12-14T00:00:00",
    "IdInstrumento": 1
    };  

    this.http.post('https://prestoapi.azurewebsites.net/api/Solicitacao', body)
    .subscribe(
        res => {
            console.log(res);
        },
        err => {
            console.log("Error occured");
        }
    );
}

API page: link

Error executing:

  

polyfills.js: 3 OPTIONS link 405 (Method Not Allowed)

    
asked by anonymous 14.12.2018 / 20:45

0 answers