Currently, I am working with an abstract class called "Achievement" which has two subclasses: "ExhibitsVisitedAchievement" and "RouteFinishedAchievement". My goal is to create instances of these achievements by using a POST call to the relevant API endpoint, either for an ExhibitsVisitedAchievement object or a RouteFinishedAchievement object.
The APIs available to me are as follows: 1. GET /api/Achievements/types - to retrieve the types of achievements 2. POST /api/Achievements/ExhibitsVisited - for recording visited exhibits 3. POST /api/Achievements/RouteFinished - for marking a finished route
I am currently facing difficulties in implementing the creation method, as I am unsure of how to make a POST request with the correct object to the respective API.
If anyone could provide guidance on this matter, it would be greatly appreciated.
As a newcomer to Angular 2, I am doing my best to learn and understand the process.
Thank you.