Commit Graph
880 Commits
Author SHA1 Message Date
CarloToso 0b078175da Improve the verbose message of WebCmdlets to show correct HTTP version (#19616) 2023-05-08 16:00:04 -07:00
mkht 9502931493 Fix HTTP status from 409 to 429 for WebCmdlets to get retry interval from Retry-After header. (#19622) 2023-05-08 15:57:27 -07:00
Greg Dennis 4b261ecdb6 Update JsonSchema.Net version to 4.1.0 (#19610) 2023-05-08 10:25:10 -07:00
Greg Dennis 1b248efb3f Test-Json: Use JsonSchema.Net (System.Text.Json) instead of NJsonSchema (Newtonsoft.Json) (#18141)
Updates the Test-Json cmdlet to use JsonSchema.Net instead of NJsonSchema in order to:

- use System.Text.Json instead of Newtonsoft
- support the latest JSON Schema drafts (up to 2020-12)
2023-05-04 08:19:32 +05:00
07e041fe10 Allow combining of -Skip and -SkipLast parameters in Select-Object cmdlet. (#18849)
* Added SkipLast parameter set to Skip parameter and updated tests

* Using Should -BeExactly with string

* Update test/powershell/Modules/Microsoft.PowerShell.Utility/Select-Object.Tests.ps1

---------

Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
Co-authored-by: Travis Plunk <github@ez13.net>
2023-05-02 13:07:32 -07:00
Steve LeeandJames Truher [MSFT] a153446a01 Add Get-SecureRandom cmdlet (#19587)
* Add `Get-SecureRandom` cmdlet

* update comments

* address Paul and Travis' comments

* Update test/powershell/Modules/Microsoft.PowerShell.Utility/Get-SecureRandom.Tests.ps1

Co-authored-by: James Truher [MSFT] <jimtru@microsoft.com>

* address codefactor

* address Ilya's feedback creating a base class for both cmdlets

* remove unused `using`

---------

Co-authored-by: James Truher [MSFT] <jimtru@microsoft.com>
2023-05-02 10:54:39 -07:00
CarloToso 543b20b4ed Enable more nullable annotations in WebCmdlets (#19359) 2023-04-24 08:38:30 +05:00
PowerShell Team Bot e1b392b6ff Update .NET SDK version from 8.0.100-preview.2.23157.25 to 8.0.100-preview.3.23178.7 (#19381) 2023-04-18 15:24:51 -07:00
Travis Plunk e05a09734f Force updating the transitive dependency on Microsoft.CSharp (#19514) 2023-04-18 12:07:46 -07:00
Dongbo Wang 8ed8b52700 Fix a race condition in Add-Type (#19471) 2023-04-12 21:41:43 -07:00
CarloToso 3dd943d212 Detect insecure https-to-http redirect only if both URIs are absolute (#19468) 2023-04-12 00:56:24 +00:00
Darren Kattan 9d036c4876 Revert "Bump Microsoft.CodeAnalysis.CSharp from 4.5.0 to 4.6.0-2.23152.6" (#19464) 2023-04-11 00:24:42 +00:00
stevenebutler 17fb783736 Support CTRL-C when reading data and connection hangs for Invoke-RestMethod and Invoke-WebRequest (#19330) 2023-04-03 23:08:35 +00:00
CarloToso fc918bc186 Remove GetResponseObject (#19380) 2023-03-24 09:11:40 +05:00
CarloToso 098be48033 Revert "Remove FormObject.cs and FormObjectCollection.cs (#19383)" (#19387)
This reverts commit 190c99a416.
2023-03-22 22:22:29 +05:00
CarloToso 190c99a416 Remove FormObject.cs and FormObjectCollection.cs (#19383) 2023-03-21 22:59:14 +05:00
CarloToso 5b1dedac61 Allow using a folder path in WebCmdlet's OutFile parameter (#19007) 2023-03-21 13:06:50 +05:00
CarloToso 8f0cd65257 Simplify ContentHelper methods (#19367) 2023-03-20 21:14:49 +05:00
CarloToso 688c7f3689 Initialize Regex lazy in BasicHtmlWebResponseObject (#19361) 2023-03-18 22:06:32 +05:00
CarloToso 69e9b439fd Fix codefactor if part 5 (#19286) 2023-03-16 22:02:42 +05:00
CarloToso e5690cb176 Add nullable annotations in WebRequestSession.cs (#19291) 2023-03-16 17:33:29 +05:00
dependabot[bot] 6e408649c4 Bump Microsoft.CodeAnalysis.CSharp from 4.5.0 to 4.6.0-2.23152.6 (#19306) 2023-03-13 17:34:39 -07:00
CarloToso 972641c9b4 Small cleanup in the WebCmdlet code (#19299) 2023-03-13 16:07:23 -07:00
Aditya Patwardhan b58db8b8f7 Bump .NET to Preview 2 version (#19305) 2023-03-09 15:06:36 -08:00
stevenebutler 9e341148f4 Support HTTP persistent connections in Web Cmdlets (#19249) 2023-03-07 09:42:08 -08:00
CarloToso 6824d489bb Fix using xml -Body in webcmdlets without an encoding (#19281) 2023-03-07 09:35:36 +05:00
CarloToso d00407612c Fix codefactor if part 1 (#19266) 2023-03-03 23:51:53 +05:00
CarloToso 8b9544b614 Adjust PUT method behavior to POST one for default content type in WebCmdlets (#19152) 2023-03-02 23:35:31 +05:00
CarloToso 03396c42cb Improve verbose message in web cmdlets when content length is unknown (#19252) 2023-03-01 18:20:59 -08:00
CarloToso f1ab653d29 Preserve WebSession.MaximumRedirection from changes (#19190) 2023-03-02 00:04:20 +05:00
CarloToso 89f0b0f1bc Remove comment and simplify condition in WebCmdlets (#19251) 2023-03-01 23:01:34 +05:00
CarloToso cf622f869f Take into account ContentType from Headers in WebCmdlets (#19227) 2023-03-01 22:56:05 +05:00
CarloToso d554d06f57 Small style changes (#19241) 2023-02-28 21:31:49 +05:00
CarloToso 476af582d5 Use using variable to reduce the nested level (#19229) 2023-02-27 14:43:15 -08:00
CarloToso c48e5cbcca Use ArgumentException.ThrowIfNullOrEmpty() in more places (#19213) 2023-02-27 14:42:07 -08:00
dependabot[bot] 4284a318c0 Bump Microsoft.CodeAnalysis.CSharp from 4.4.0 to 4.5.0 (#19233) 2023-02-27 14:10:52 -08:00
Berkan Diler 0ba89599b2 Replace BitConverter.ToString with Convert.ToHexString where appropriate (#19216) 2023-02-27 14:03:54 -08:00
dependabot[bot] 7b7e4c865b Bump Markdig.Signed from 0.30.4 to 0.31.0 (#19232) 2023-02-27 13:59:10 -08:00
Aditya Patwardhan 2d15e0c5b6 Update to .NET 8 preview 1 build (#19194) 2023-02-22 16:12:16 -08:00
Armaan Mcleod 0be3eeac38 Add -Path and -LiteralPath parameters to Test-Json cmdlet (#19042) 2023-02-21 10:14:08 -08:00
CarloToso 60b4e9704f Allow to preserve the original HTTP method by adding -PreserveHttpMethodOnRedirect to Web cmdlets (#18894) 2023-02-14 08:40:42 -08:00
CarloToso 69a4d79400 Webcmdlets display an error on https to http redirect (#18595) 2023-02-14 08:32:48 +05:00
CarloToso 22b33c15a2 Revert comment changes in WebRequestPSCmdlet.Common.cs (#19136) 2023-02-12 11:09:20 +05:00
CarloToso 1848740cb7 Small cleanup webcmdlets (#19128) 2023-02-11 20:25:37 +05:00
CarloToso 2f43013df3 Build the relative URI for links from the response in Invoke-WebRequest (#19092) 2023-02-10 21:50:01 +05:00
CarloToso ed68c861d4 Fix redirection for -CustomMethod "POST" in WebCmdlets (#19111) 2023-02-10 16:14:29 +05:00
CarloToso 9b228dcc62 Merge partials in WebRequestPSCmdlet.Common.cs (#19126) 2023-02-10 12:27:56 +05:00
CarloToso c4d688d6e3 Cleanup WebCmdlets comments (#19124) 2023-02-09 16:58:55 +05:00
CarloToso 0f1251ebde Dispose previous response in Webcmdlets (#19117) 2023-02-09 13:38:24 +05:00
CarloToso 359f5c35f1 Improve Invoke-WebRequest xml and json errors format (#18837) 2023-02-09 13:22:04 +05:00