I have a Question for angular 5. I become an API Call to make this over
angular but I become always a bad request from the API IIS Server. <br>
This is the String<br> `With the Methode POST
On the http-Header:
Accept: text/javascript
Content-Type: application/json
I'm Body: {encodedetUrl}
and this is my Code i take
getPosition(sql: string): Observable<Position[]> {
let headers = new HttpHeaders().set('Content-Type',
'application/json');
headers = headers.set('Accept', 'text/javascript');
let sqlstring = encodeURIComponent(sql);
let string = '{"Befehl": "' + sqlstring + '","Datenbank":
"DBScharnsteinTest", "Login": "username", "Passwort": "password",
"PKMitarbeiterID": "2640"}';
console.log();
return this.httpClient.post<Position[]> (this.url, string, {headers
});
}
Can anybody Help me why that not work.
Thx
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.