Fix the curl error and get the correct response body.