Send Byte array using Invoke-RestMethod

Welcome Forums General PowerShell Q&A Send Byte array using Invoke-RestMethod

Viewing 0 reply threads
  • Author
    Posts
    • #240473
      Participant
      Topics: 6
      Replies: 15
      Points: 141
      Rank: Participant

      Is it possible to pass along a byte array as apart of a post request using Invoke-RestMethod?

      I have a Byte Array in memory that I want to send along using the -Form parameter of Invoke-RestMethod (PS7). The alternative is to save it to disk (which I want to avoid) first, then use Get-Item to return an object of [System.IO.FileInfo], which Invoke-RestMethod automatically processes and submits the binary data, how would you do this manually?

      • This topic was modified 3 months, 2 weeks ago by Phatmandrake.
      • This topic was modified 3 months, 2 weeks ago by Phatmandrake.
Viewing 0 reply threads
  • The topic ‘Send Byte array using Invoke-RestMethod’ is closed to new replies.