Send Byte array using Invoke-RestMethod

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

Viewing 0 reply threads
  • Author
    • #240473
      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?

Viewing 0 reply threads
  • You must be logged in to reply to this topic.