I am trying to urlencode this string before I submit.
queryString = 'eventName=' + evt.fields["eventName"] + '&' + 'eventDescription=' + evt.fields["eventDescription"];
var _F_jsUrl = 'https:\/\/www.example.com\/accounts\/static\/_\/js\/k\x3dgaia.gaiafe_glif.en.nnMHsIffkD4.O\/m\x3dglifb,identifier,unknownerror\/am\x3dggIgAAAAAAEKBCEImA2CYiCxoQo\/rt\x3dj\/d\x3d1\/rs\x3dABkqax3Fc8CWFtgWOYXlvHJI_bE3oVSwgA';
I am trying to make an API call to Influx db from PHP program. The curl request to be made is -
curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "q=SHOW MEASUREMENTS"
The code in PHP that I am stuck with is -
$curl = curl_init();curl_setopt_array($curl, array( CURLOPT_URL => "http://localhost:8086/query?pretty=true", CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( "cache-control: no-cache" ),));
I am not sure in which curl_setopt_array should I send the q=SHOW MEASUREMENTS
How do you URL escape an MFC CString?
When I assign an array of data to be POSTed as a cURL option (via CURLOPT_POSTFIELDS), do I need to urlencode that data first or will that be taken care of?