Implemented both GET-methods and POST-methods in REST-API