GET and POST rest API working