Re: Hitting an API with Euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message

Sorry, it is not that easy. Between 1.0.5 and 1.0.9, I also added headers management in curl_get, curl_post, curl_patch and curl_delete:

Following lines have to be added in each function:

  atom pheaders 
 
  pheaders = NULL 
  for i = 1 to length(headers) do 
    pheaders = curl_slist_append(pheaders, headers[i]) 
  end for 
  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, pheaders) 

Functions declarations are changed as here:

global function curl_get(atom curl, sequence url, sequence headers) 
global function curl_post(atom curl, sequence url, sequence headers, object body) 
global function curl_put(atom curl, sequence url, sequence headers, object body) 
global function curl_delete(atom curl, sequence url, sequence headers) 
global function curl_patch(atom curl, sequence url, sequence headers, object body) 

With Eu4, replace global by public.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu