Re: Authentication problems with 1.5 api via perl.

2013-02-28 Thread cmuser
hash reference give me this error malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") On Thursday, February 28, 2013 8:30:37 PM UTC+5:30, Jay Lawrence wrote: > > I don't know this interface, but I suspect that you need to pass a

Re: Authentication problems with 1.5 api via perl.

2013-02-28 Thread Jay Lawrence
I don't know this interface, but I suspect that you need to pass a reference to your params. instead of my $resp= $ua->request($req,%param); try my $resp= $ua->request($req,\%param); Note the extra '\'. jay On Thursday, October 21, 2010 2:06:16 PM UTC-4, Jeff wrote: > > I'm trying to wri

Re: Authentication problems with 1.5 api via perl.

2013-02-28 Thread cmuser
I am now able to post the review as draft from below script, but unable to set the parameters. Can u pls suggest where i m going wrong? Getting error- Can't locate object method "previous" via package "submit_as" (perhaps you forgot to load "submit_as"?) at /usr/lib/perl5/site_perl/5.8.8/HTTP

Re: Authentication problems with 1.5 api via perl.

2013-02-26 Thread kapila narang
Thanks for giving me the lead.. i will try that out. Apologize for miscommunication. On Tue, Feb 26, 2013 at 3:59 PM, Christian Hammond wrote: > Go back and thoroughly read and understand the API documentation. Read the > post-review source code. You're taking wild stabs in the dark with > incorr

Re: Authentication problems with 1.5 api via perl.

2013-02-26 Thread Christian Hammond
Go back and thoroughly read and understand the API documentation. Read the post-review source code. You're taking wild stabs in the dark with incorrect fields and URLs. That URL you're posting to is not an API URL. Also, keep all this to *one* thread. There's posts from you about this all over

Re: Authentication problems with 1.5 api via perl.

2013-02-26 Thread cmuser
Sorry for disturbing you all asking such stupid question. But i am badly stuck. :( This is what i tried now, still no gain curl -k -H "Authorization: Basic YWRtaW46YWRtaW4=" -X POST -d "repository_id=cvsrepo&username=kapila&password=kapila123&submit-as=kapila" http://codereview.xyz.com/r/new

Re: Authentication problems with 1.5 api via perl.

2013-02-26 Thread Christian Hammond
The curl command is pretty wrong. You're still not passing an Authorization header. -H by itself doesn't turn the value into one. You're also submitting JSON data, not form data. The server won't be able to recognize any of that. Christian -- Christian Hammond - chip...@chipx86.com Review Boa

Re: Authentication problems with 1.5 api via perl.

2013-02-26 Thread Gavin Main
I didn't realise you were trying to post a review. Does post-review (bundled with RBTools) not help you? If not, why? On Tuesday, 26 February 2013 16:45:43 UTC+8, cmuser wrote: > > Thanks. I will try & follow it. > What i did is , tried writing the script(mentioned above) to post a review > r

Re: Authentication problems with 1.5 api via perl.

2013-02-26 Thread cmuser
Thanks. I will try & follow it. What i did is , tried writing the script(mentioned above) to post a review request which is failing of xyz reason. So thought of using HTTP::Recorder to get the script of posting a review request. But again facing issues in that. curl command which worked once

Re: Authentication problems with 1.5 api via perl.

2013-02-26 Thread Gavin Main
After a bit of fiddling and research I found that the LWP and HTTP::Cookies modules worked for me. Have a look at the documentation on CPAN http://search.cpan.org/~gaas/HTTP-Cookies-6.01/lib/HTTP/Cookies.pm This link was also very helful: http://lwp.interglacial.com/ch11_01.htm Basically I wan

Re: Authentication problems with 1.5 api via perl.

2013-02-25 Thread cmuser
i have tried to built like this,but still not working #!/usr/local/bin/perl use LWP::UserAgent; use MIME::Base64; $url="http://codereview.xyz.com/api/review-requests/";; $newurl="http://codereview.xyz.com/r/new/";; $user="admin"; $pwd="admin"; $text="$user:$pwd"; $text = encode_base64($text); #

Re: Authentication problems with 1.5 api via perl.

2012-08-10 Thread Gav
Hi Jeff, did you ever get this resolved? I am facing a similar issue. Christian, I am loving Reviewboard. Thank You!!! Cheers, Gav On Friday, 22 October 2010 02:06:16 UTC+8, Jeff wrote: > > I'm trying to write an svn pre-commit hook against a totally new > installation of reviewboard 1.5 (upgra

Re: Authentication problems with 1.5 api via perl.

2010-10-26 Thread Christian Hammond
Hi Jeff, The 500 error you're hitting is fixed in the latest Djblets release. You can upgrade by doing: easy_install -U Djblets It's been ages since I last attempted anything with Perl's HTTP code, so I can't really say what's going wrong there, except that the typical process for Basic HTTP Auth

Authentication problems with 1.5 api via perl.

2010-10-21 Thread Jeff
I'm trying to write an svn pre-commit hook against a totally new installation of reviewboard 1.5 (upgraded from the previous version, but never really used). As far as I can tell from the documentation, the json login page isn't used anymore, and I just use basic HTTP authentication. My perl code