Adding dependency on mikeal/request and changing to using it instead of http module.
Removing old code
Wrapping parsed URL inside object for request