Badgerati / Pode

Pode is a Cross-Platform PowerShell web framework for creating REST APIs, Web Sites, and TCP/SMTP servers
https://badgerati.github.io/Pode
MIT License
866 stars 92 forks source link

Refactor Byte Conversion Functions; Remove Duplicate Task Process Definitions #1424

Closed mdaneri closed 1 month ago

mdaneri commented 1 month ago

Summary of Changes:

  1. Removed ConvertFrom-PodeValueToByteArray:

    • The function ConvertFrom-PodeValueToByteArray has been removed as it's no longer needed.
  2. Updated Encoding Logic in Response.ps1:

    • In Public/Response.ps1, line 219, the following change was made: Replaced:
      $Bytes = ConvertFrom-PodeValueToByteArray -Value $Value 

      With:

      $Bytes = [System.Text.Encoding]::UTF8.GetBytes($Value) 
  3. Removed Duplicated Get-PodeTaskProcess:

    • The function Get-PodeTaskProcess had a duplicate definition, which has been removed.
  4. Renamed ConvertFrom-PodeValueToByteArray to ConvertFrom-PodeStreamToByteArray:

    • The remaining instances of ConvertFrom-PodeValueToByteArray were renamed to ConvertFrom-PodeStreamToByteArray to reflect its actual functionality and improve clarity.