Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Hello Anonymous Monk,

You should be using the credentials method. Why aren't you using the credentials method?

To be honest I thought this is better passing the credentials to the header as I see the same thing happening with a CURL request. It is not the credentials that are producing the problem because on other POST / PUT / DELETE requests that I have already format are working just fine. The problem appears when I am trying to send the file.

Where does the error come from?

This error comes from the client side, complaining that it can not find the file to post it.

I dont understand what you're trying to do with that code snippet.

I am trying to post a file to server for further processing. The proposed solution that you send I will take a look, and try to apply it on my case.

Have you printed out the resulting request to see what it looks like?

Yes I am printing the return of the request and this is the error output:

$VAR1 = '{"detail":"Multipart form parse error - Invalid boundary in m +ultipart: None"}';

I will give it a try on your proposed solution and I will update my question. Thank you for your time and effort. BR / Thanos

Seeking for Perl wisdom...on the process of learning...not there...yet!

In reply to Re^2: POST file through REST::Client by thanos1983
in thread POST file through REST::Client [SOLVED] by thanos1983

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, 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, 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.
  • Log In?

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

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (4)
    As of 2021-03-05 01:01 GMT
    Find Nodes?
      Voting Booth?
      My favorite kind of desktop background is:

      Results (108 votes). Check out past polls.