in reply to Can a POST command (with a file attachment) be simulated via the terminal?

As an alternative to curl to actually doing it externally from the command-line, if your app uses Mojolicious then you can run it from the command-line more directly as over HTTP(s).

To avoid XY-problem (my fingers tried to type XS there, which is a bit Freudian), I think you'll do best of all by having the file-handling in its own function, and automated tests to call that file-handling with various inputs and checking the results.

  • Comment on Re: Can a POST command (with a file attachment) be simulated via the terminal?
  • Download Code