MetaDefender API http request object

Const URL='https://api.metadefender.com/v4/file/bzIwMDYxNi1TSW42NDBPVlprTWw3YjRBMQ'; 
Begin //@main
srlist:= TStringlist.create;
with THTTPSend.create() do begin
Headers.Add('apikey: 6b337c92c792174a54acd715ab1aae64');
writeln(botostr(HTTPMethod('GET',URL)));
with TJson.create() do begin
Parse(StreamtoString3(Document));
Split(Stringify,'{',srlist)
end;
writeln(itoa(resultCode)+':'+resultString+CRLF+srlist.text);
clear;free;
end;
srlist.Free; //with
import requests 
url = "https://api.metadefender.com/v4/file/bzIwMDYxNi1TSW42NDBPVnJJb0p1WTZWYTY"
headers = { 'apikey': "6b337c92c792174a54acd715ab1aae64" }
response = requests.request("GET", url, headers=headers) print(response.text)
// Instantiate a WinHttpRequest object. 
httpReq:= CreateOleObject('WinHttp.WinHttpRequest.5.1');
// Open an HTTP connection.
hr:= httpReq.Open('GET', aURL, false);
if hr= 0 then
httpReq.setRequestheader('apikey','6b337c92c792174a54acd715ab1aae64'); httpReq.Send() /// Send HTTP Request & get Responses. writeln(httpReq.responseText)
writeln(httpReq.GetAllResponseHeaders());
httpReq:= NULL; //close
curl 'https://api.metadefender.com/v4/file/bzIwMDYxNi1TSW42NDBPVnJJb0p1WTZWYTY' \ -H 'apikey: 6b337c92c792174a54acd715ab1aae64'

Functions and Procedures

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store