So maybe we're talking about something different?

$ua->default_header( $field => $value ) This is just a short-cut for $ua->default_headers->header( $field +=> $value ). Example: $ua->default_header('Accept-Encoding' => scalar HTTP::Message::d +ecodable()); $ua->default_header('Accept-Language' => "no, en");

So couldn't I do something like:

$client->transport->default_header( 'my_special_header' => 'sha1hash') +;

EDIT: hmm... this in the LWP doc confuses me,

request_preprepare => sub { my($request, $ua, $h) = @_; ... } The handler is called before the request_prepare and other standar +d initialization of the request. This can be used to set up headers a +nd attributes that the request_prepare handler depends on. Proxy init +ialization should take place here; but in general don't register hand +lers for this phase.

Is it saying in the request_prepare is where I should set my headers, or is this merely an option? I can't tell if $client->transport->default_headers() is working. haha. Was working on exporting a pcap (I develop on a vm but have wireshark locally)

Thanks for all the guidance. I can't tell if my frustration is coming through in my posts (which usually means it is) but it certainly isn't directed at you Anonymous Monk. I really do appreciate your helping me through all this.

EDIT: Hahaha!!!! IT does work, it helps to spell the name of the key right!

$client->transport->default_header( 'properly-speleeed-key' => $value +);

Does exactly what I want!!!


In reply to Re^6: [SOAP::Lite] Obtain request body before request is sent? by three18ti
in thread [SOLVED][SOAP::Lite] Obtain request body before request is sent? by three18ti

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.