Tuesday, 4 December 2018

windows 7 - Using PowerShell with POST requests?

The particular API I'm using is meant to be used with cURL like


$ curl -F "file=@test.txt" https://file.io/?expires=1w

I can't figure out how to emulate the "-F" using PowerShell.


powershell Invoke-RestMethod -Uri 'https://website.com' -Method POST -InFile .\file.txt

We don't need to use Invoke-RestMethod if there's an easier way. I'm open to suggestions.

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...