move curl code into request class
Merge pull request #3 from dadeg/request

move curl code into request class