urlencode url for curl