Hi, Thank you but but the email id i am passing through argument. Its not taking through below code in webapp.pm, Could you please let me know the reason and advise any solution?

webapp.pm

package webapp; use Dancer2; use Op; use Op qw(api_call3); use Op1; our $accestoken = ""; my $client; our $p; our $id; our $site_id; our $value; my %common = (title => 'webapp'); get '/:site_id' => sub { my $id = route_parameters->get('site_id'); template 'query2' => { %common } ; }; get '/got/:site_id' => sub { $p = params->{code}; defined params->{code} or print "Error: Missing access code"; $id = route_parameters->get('site_id'); $site_id = params->{$id}; template 'query2' => { 'title' => 'webapp' }; }; post '/' => sub { if (body_parameters->get('Userslist') eq 'Users-list' ) { $id = route_parameters->get('site_id'); my $site_id2 = params->{$id}; @access_token = client2($site_id2)->get_access_token($p); for my $i (0..$#access_token) { $accestoken = $access_token[$i]{NOA_access_token}; } push @accesstoken , $accestoken; my $r2 = Op::api_call3(@accesstoken); my $r3 = Op::mailusersread({OKTAUsersList => param('Userslist') +, Email => param('Email')}); #template query2 => { %common, button => 'Users-list' } template result2 => { title => 'webapp', result2 => $r3 } } elsif (body_parameters->get('Apps-list') eq 'Apps') { template query2 => { %common, button => 'Apps-list' } } my %body_parameters = params('body'); # my $email3 = param('Email'); print Dumper %body_parameters; }; sub client2($) { $id = route_parameters->get('site_id'); $site_id = $id; Net::OAuth2::Profile::WebServer->new( client_id => 'xxxxxxxxxxxxxxxxxxxxxx', client_secret => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +xxxx', authorize_url => 'https://dev.oktapreview.com/oauth2/ +v1/authorize', access_token_url => 'https://dev.oktapreview.com/oauth2/v1/token +', redirect_uri => uri_for ("/got/synchronydev"), grant_type => 'authorization_code', ); } true

My body parameters are below and its not taking the value of Email

$VAR1 = 'OKTAUsersList'; $VAR2 = 'on'; $VAR3 = 'Email'; $VAR4 = [ 'chandan.ghosh@abc.com', '' ]; $VAR5 = 'Userslist'; $VAR6 = 'Users-list';

Please advise


In reply to Re^18: Need to know the process to implement perl script into web application server. by chandantul
in thread Need to know the process to implement perl script into web application server. by chandantul

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.