I'm working on a CLI tool, it's working nicely but I've run into a strange issue.
I'm using FPHTTPClient to download various files, works fine, except with GitHub.
This works: WriteLn( TFPHTTPClient.SimpleGet('
https://httpbin.org/uuid') );
This doesn't: WriteLn( TFPHTTPClient.SimpleGet('
https://api.github.com/repos/OpenBD/openbd-core/releases/latest') );
I have the OpenSSL DLLs and that part seems fine, but when I try hitting the GitHub API nothing seems to work.
ResponseStatusCode returns 0, and data just spits out a blank line.
I'm lost.. Anyone seen this behaviour before?
FHTTPClient := TFPHTTPClient.Create(nil);
try
FHTTPClient.AllowRedirect:=true;
data := FHTTPClient.Get( 'http://api.github.com/repos/OpenBD/openbd-core/releases/latest' );
WriteLn(FHTTPClient.ResponseStatusCode);
WriteLn( data );
finally
FHTTPClient.Free;
end;
The url works fine in my browser, it works fine in Insomnia (Desktop REST utility)