omegahat / RCurl

Other
29 stars 14 forks source link

how to use Rcurl #15

Open pronix opened 10 years ago

pronix commented 10 years ago

hello i want sent by Rcurl request curl -k -u NAME:Password --data-urlencode search="search error | head 10" -d "output_mode=csv" https://api.splunk/servicesNS/vasilets/search/search/jobs/export

but i can find where defined data-urlencode please show how to make requesr by Rcurl. thanks

duncantl commented 10 years ago

Hi I'd experiment with postForm()

u = 'https://api.splunk/servicesNS/vasilets/search/search/jobs/export'
postForm(u, search = "search error | head 10", 
                  .opts = list(userpwd = "name:password", sslverifypeer = FALSE), style = 'post')