Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: XPOST syntax in WWW::Curl

by pme (Monsignor)
on Feb 01, 2015 at 15:57 UTC ( [id://1115227]=note: print w/replies, xml ) Need Help??


in reply to XPOST syntax in WWW::Curl

Hi Steve_BZ,

This is a LWP::UserAgent based solution. The code snippet is untested and definitely needs modification to insert into your code environmant.

use LWP::UserAgent; $ua = LWP::UserAgent->new; my $req = HTTP::Request->new(POST => "$url"); # -X $req->header('Authorization' => "Token $token"); # -H my $res = $ua->request($req, [ $gl_media_defaults{v_suffix} => "\@$fil +e_to_upload"]); # -F if ($res->is_success) { print $res->content; } else { print $res->message; }

Replies are listed 'Best First'.
Re^2: XPOST syntax in WWW::Curl
by Steve_BZ (Chaplain) on Feb 01, 2015 at 17:00 UTC

    Hi pme,

    Thanks for that.

    Well it seemed to work (that is to say it didn't error). I won't be able to see until tomorrow if the files were uploaded or not.

    The only thing that was suspicious is that the mp4 file was too quick to upload, so I imagine there was a problem.

    However, it gives me something to work on and debug. Thanks very much,

    Regards

    Steve.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2025-05-22 23:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.