Only change TLS settings if required #31
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
During module initialisation, calls are made to
Get-SXApi
to see if it works without manually enabling TLS v1.2. If it does work - fine, carry on as normal. If it doesn't work, and TLS v1.2 needs to be manually set, then this is done only at the start of each API call, then is reset again immediately afterwards, thus not making any lasting changes to the PowerShell session. (Fixes #21 - again, but this time better in I think 😉)To facilitate this, the calls to the API have been extracted to a new private function
Get-SXData
- fixes #2