Replacing Curl request with HTTP request 2