Updates AP cURL code to match with frontend.