Thanks for your response. I have webapp.pm from where i call my sub in op.pm , If i am posting in webapp.pm then its posting to root hence the browser showing Referer value below in browser and the same is not from op.pm

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/av +if,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q +=0.9 Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Cache-Control: max-age=0 Connection: keep-alive Content-Length: 30 Content-Type: application/x-www-form-urlencoded Cookie: plack_session=ba1d0d240ba3ed6c6fca13c240c758a6c812200d Host: testchandan.com:5001 Origin: https://testchandan.com:5001 Referer: https://testchandan.com:5001/?code=M-asK8wDQ7gE6BKdqUBOdTQPoH +2gMrLF4dcH3XDodNE&state=1234 Sec-Fetch-Dest: document Sec-Fetch-Mode: navigate Sec-Fetch-Site: same-origin Sec-Fetch-User: ?1 Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537. +36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36

My webapp.pm

package webapp; use Dancer2; use Op; our $VERSION = '0.1'; my $r2; get '/' => sub { #&client1; template 'query2' => { 'title' => 'webapp' }; }; post '/'=> sub { $r2 = Op::result4({OKTAUsersList => param('OKTA-Users-List'), Email => param('Email')}); template result4 => { title => 'webapp', result4 => $r2 } }; true;

Can i capture above query string parameter values from app.psgi or webapp.pm and puse the same to op.pm for making the access_token call in my Dancer2 app.


In reply to Re^4: Capturing query string parameter from Header response. by chandantul
in thread Capturing query string parameter from Header response. 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.