Replaced curl code with custom client based on Buzz