mardi 4 mai 2021

pass a form object to http delete method using Angular

I have a form object on the server side and on the UI side in sync. I use this form object to specify the values using which some server side computation takes place. For example the simplest form declaration is

export interface EmployeeForm {
    name:string;
    id:number;
}

The corresponding Java class

 class EmployeeForm {
   String name;
   Integer id;
}

When I call the service side method for get/post/put , I am able to send the form object from WebUI. However I don't see similar option to send the form object when calling delete using HttpClient.delete method. On the server side, the API to handle delete request handles request from other server side components (for example some commands using SpringShell command utility) and so I prefer reusing the API. Do I need to develop new rest methods specific to UI request? Any pointers will be helpful since I did not get a solution so far. If you need additional details to understand my issue then please let me know.




Aucun commentaire:

Enregistrer un commentaire