0

I have an API with data it takes ID to return a specific data or it return null. And I want to know how to do it with angular.

  • Does this answer your question? [How to pass url arguments (query string) to a HTTP request on Angular?](https://stackoverflow.com/questions/34475523/how-to-pass-url-arguments-query-string-to-a-http-request-on-angular) – Batajus Jan 04 '22 at 11:09
  • It doesn't work – Yasmin-Mohsin Jan 04 '22 at 11:17
  • In that case share your code – Batajus Jan 04 '22 at 11:18
  • `this.http.get ('https://www.worldofss.net:8883/api/v1/RequestManagement/Details', { params:{id:id} } )` – Yasmin-Mohsin Jan 04 '22 at 11:22
  • And what does not work now? – Batajus Jan 04 '22 at 11:50
  • It return two errors -GET https://www.worldofss.net:8883/api/v1/RequestManagement/Details?Id=8 400 -core.mjs:6469 ERROR HttpErrorResponse {headers: HttpHeaders, status: 400, statusText: 'OK', url: 'https://www.worldofss.net:8883/api/v1/RequestManagement/Details?Id=8', ok: false, …} – Yasmin-Mohsin Jan 04 '22 at 12:15
  • I don't know this API but after clicking on that link it said `errors":{"Id":["The value '8' is not valid."]}` – Batajus Jan 04 '22 at 12:17

0 Answers0