sample code of http client using curl