working properly for get requests
Should be working with post data