Can you use "contains" in an <@if expr?
Mark Weiss Mobile-435.363.6363 On Jun 13, 2013, at 8:05 PM, Wayne Irvine <[email protected]> wrote: > Wow, have never used the Web Call action before. Looks great. > > Having a few issues though. It's reporting a 400: Bad Request. I tried > hardcoding the apiKey into the Web Call and it no longer reports that it is > not seeing the apiKey but still fails. Is there something special about the > way I define the values in the arguments or something I am missing? > > Currently I have: > taken @@request$token > apiKey @@request$rpx_api_key > format json > extended true > > Wayne Irvine > > On 14/06/2013, at 4:19 AM, Robert Shubert <[email protected]> wrote: > >> @URL or the WebCall action is used for this. >> >> If using the action, it’s straight forward to copy the URL in and, on the >> Post Data tab, create the 4 arguments (token, apiKey, format and extended). >> >> If you use @URL, you should build a small array of those arguments first and >> then pass them into POSTARGARRAY= >> >> Since 6.2.1 TeraScript uses cUrl under the hood. >> >> Robert >> >> From: Wayne Irvine [mailto:[email protected]] >> Sent: Thursday, June 13, 2013 1:04 AM >> To: [email protected] >> Subject: TeraScript-Talk: PHP and cURL >> >> I'm converting a PHP file to Terascript and am a bit stuck on one part. The >> PHP file calls cURL: >> >> $post_data = array('token' => $token, >> 'apiKey' => $rpx_api_key, >> 'format' => 'json', >> 'extended' => 'true'); //Extended is not available to >> Basic. >> >> $curl = curl_init(); >> curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); >> curl_setopt($curl, CURLOPT_URL, 'https://rpxnow.com/api/v2/auth_info'); >> curl_setopt($curl, CURLOPT_POST, true); >> curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data); >> curl_setopt($curl, CURLOPT_HEADER, false); >> curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); >> curl_setopt($curl, CURLOPT_FAILONERROR, true); >> $result = curl_exec($curl); >> if ($result == false){ >> echo "\n".'Curl error: ' . curl_error($curl); >> echo "\n".'HTTP code: ' . curl_errno($curl); >> echo "\n"; var_dump($post_data); >> } >> curl_close($curl); >> >> Any ideas how I would tackle this in Terascript? Would I use the File >> function or call cURL as an external? >> >> >> >> Wayne Irvine >> w: http://www.byteserve.com.au/ >> p: +61 2 9960 6099 >> m: 0409 960 609 >> >> >> To unsubscribe from this list, please send an email to >> [email protected] with "unsubscribe terascript-talk" in the body. >> >> To unsubscribe from this list, please send an email to >> [email protected] with "unsubscribe terascript-talk" in the body. > > Wayne Irvine > w: http://www.byteserve.com.au/ > p: +61 2 9960 6099 > m: 0409 960 609 > > > To unsubscribe from this list, please send an email to > [email protected] with "unsubscribe terascript-talk" in the body. ---------------------------------------- To unsubscribe from this list, please send an email to [email protected] with "unsubscribe terascript-talk" in the body.
