@StoRmtec wrote:
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.
This is the String
`With the Methode POSTOn 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
Posts: 1
Participants: 1