Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Hi, "not managing to get the injection to work" doesn't really describe the problem well

Sorry - yes, re-reading my question shows it is not very clear.

What I meant was that injecting the token_type parameter is not working. My sub doesn't throw an error but causes the super class sub to throw an error that token_type is missing.

push_header() since that does not appear as a documented method on an HTTP::Response object

HTTP::Response extends HTTP::Message which requires's HTTP::Headers and push_header() is a method of this class.

Although looking at the link you provided sparked the realisation that token_type is not a header at all. It needs to be added to the content rather than the header. So I think I am going to have to decode the JSON content to a Perl data structure, add the token_type parameter before encoding it back to JSON and passing that to the super class' sub.

I can see running into propblems with the encoding as there doesn't appear to be a way to reverse the effects of decoded_content

In reply to Re^2: Injecting a value into HTTP::Header by Bod
in thread Injecting a value into HTTP::Header by Bod

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2022-01-26 12:36 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (69 votes). Check out past polls.