Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Injecting a value into HTTP::Header

by Bod (Curate)
on Apr 19, 2021 at 16:31 UTC ( #11131476=note: print w/replies, xml ) Need Help??


in reply to Re: Injecting a value into HTTP::Header
in thread Injecting a value into HTTP::Header

Hope this helps!

It helped immensely thank you...
It forced me to go and find where I had got push_header() from. In doing that search of source code it twigged that it was not the header that needed token_type but the content. With that realisation, the rest sort of fell into place.

Here is the working overridden sub in case anyone has a similar problem and comes across this in future:

sub construct_tokens { my ($self, $oauth2, $response) = @_; my $content = eval {decode_json($response->content)}; unless ($@) { $content->{'token_type'} = 'bearer'; $response->content(encode_json($content)); } $self->SUPER::construct_tokens($oauth2, $response); }

Can anyone explain what the documentation means when is says to contribute one should submit a git pull request? I would like to contribute my LinkedIn solution when it is complete and tested as I am sure I am not the only person wanting to connect to LinkedIn with Perl.

Replies are listed 'Best First'.
Re^3: Injecting a value into HTTP::Header
by choroba (Archbishop) on Apr 19, 2021 at 17:07 UTC
      you need to fork the GitHub repository and create a pull request

      That's the bit I'm not sure what I'm doing...
      But I guess the starting point is to create a GitHub account and go from there.

        … and/or getting started with git's magic: Git Magic

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11131476]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2022-01-22 18:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (63 votes). Check out past polls.

    Notices?