Libcurl get params in utf-8?

Hi Carlos,

It is not utf-8, it is url encoding. You can use TCurlUrlApiClass or printf to encode:

TCurlUrlApiClass approach:

uapi                          TCurlUrlApiClass
  CODE
  host = 'http://server.com'
  params = 'where={{ “nsacrux”: 20}'
  uapi.Init()
  uapi.SetPart(CURLUPART_URL, host)
  uapi.SetPart(CURLUPART_QUERY, params, CURLU_URLENCODE)
  uapi.GetPart(CURLUPART_URL, url)
  rc = curl.SendRequest(url,...)

printf approach:

  host = 'http://server.com'
  params = 'where={{ “nsacrux”: 20}'
  url = printf('%s?%u', host, params)
  rc = curl.SendRequest(url,...)
3 Likes