api, issue with ssl/tls

Can't resolve this issue i'm facing when fetching from my api for some reason:
Invoke-WebRequest -Uri api.gustav.lol/items
Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a receive.
At line:1 char:1
+ Invoke-WebRequest -Uri api.gustav.lol/items
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a receive.
At line:1 char:1
+ Invoke-WebRequest -Uri api.gustav.lol/items
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
4 Replies
Chaika
Chaika16mo ago
I'm not sure of powershell's default behavior, and you didn't specify https://
Chaika
Chaika16mo ago
that loads fine for me though:
No description
Chaika
Chaika16mo ago
Cloudflare does have 100 second timeout if it takes longer then that
Gustav
GustavOP16mo ago
I already tried with https specified and with curl/wget i started getting this now
curl https://api.gustav.lol/items
curl : The request was aborted: Could not create SSL/TLS secure channel.
At line:1 char:1
+ curl https://api.gustav.lol/items
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
curl : The request was aborted: Could not create SSL/TLS secure channel.
At line:1 char:1
+ curl https://api.gustav.lol/items
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
I noticed this is a client-side issue i'l close this i guess

Did you find this page helpful?