implemented the requests to rest api