So how can i pass parameter  ?

On Fri, Nov 22, 2013 at 7:18 PM, greelgorke <[email protected]> wrote:

> se also the examples in the readme on github. the post example uses data
>
>
> Am Freitag, 22. November 2013 11:35:07 UTC+1 schrieb Ashutosh Das:
>
>> I m using 
>> https://github.com/danwrong/restler<https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fdanwrong%2Frestler&sa=D&sntz=1&usg=AFQjCNFRbeZm0P47APp-N9NWD7hT6eIisw>
>> for pastebin  REST client.
>> Here is my code :
>>
>> *var sys = require('util'),*
>> *    rest = require('restler');*
>>
>> *var key = "my key";*
>> *var paste = " test from nodejs";*
>>
>> *var apipas = "paste";*
>>
>> *var name = "hirenTest" ;*
>>
>> *var hiren = new Object();*
>>
>> *  hiren.api_dev_key =key,*
>> *  hiren.api_option = apipas,*
>> *  hiren.api_paste_code = paste,*
>>
>> *rest.post('http://pastebin.com/api/api_post.php
>> <http://www.google.com/url?q=http%3A%2F%2Fpastebin.com%2Fapi%2Fapi_post.php&sa=D&sntz=1&usg=AFQjCNFl2mIaeDgFAbaWRWZzezhlVX82Sw>',
>> {*
>> * // method : "POST" ,*
>> *  query : hiren*
>> *}).on('complete', function(data) {*
>> *  console.log(data);*
>> *});*
>>
>> Everytime I run this code it shows  "Bad API request, invalid api_option"
>> .
>>
>  --
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "nodejs" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nodejs/sqRGIThNud4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to