Skip to content

Commit

Permalink
Ensure System.Net.Http assembly is loaded when importing
Browse files Browse the repository at this point in the history
(as Test-ServerResponse requires it)
  • Loading branch information
hmmwhatsthisdo committed May 31, 2018
1 parent 5068109 commit dfbe131
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion JiraPS/JiraPS.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
# Load Web assembly when needed
# PowerShell Core has the assembly preloaded
if (!("System.Web.HttpUtility" -as [Type])) {
Add-Type -Assembly System.Web
Add-Type -AssemblyName "System.Web"
}
# Load System.Net.Http when needed
# PowerShell Core has the assembly preloaded
if (!("System.Net.Http.HttpRequestException" -as [Type])) {
Add-Type -AssemblyName "System.Net.Http"
}
#endregion Dependencies

Expand Down

0 comments on commit dfbe131

Please sign in to comment.