Refactored request generation, and added a check for long URL's that converts the request to a POST if URL is too long