Skip to content

miyako/curl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

version platform license downloads

Licensing

  • the source code of this component is licensed under the MIT license.
  • see curl.se for the licensing of curl.

curl

dependencies.json

{
   "dependencies": {
   	"curl": {
   		"github": "miyako/curl",
   		"version": "*"
   	}
   }
}

based on stunnel/static-curl

note for Windows 11: unlike the curl that comes with Windows 11, this edition uses OpenSSL. some servers may require the -k option unless local certficates are properly configured (search "curl error 60").

Usage - with UI

#DECLARE($params : Object)

If (Count parameters=0)
	
	CALL WORKER(1; Current method name; {})
	
Else 
	
	$form:=cs._curlForm.new()
	
End if 

Usage - without UI

#DECLARE($params : Object)

If ($params=Null)
	
	/*
		async calls must be performed in a worker or form
	*/
	
	CALL WORKER(1; Current method name; {})
	
Else 
	
	var $curl : cs.curl
	$curl:=cs.curl.new(cs._curl_Controller)
	
	$URL:="https://resources-download.4d.com/release/20.x/20.5/latest/mac/tool4d_arm64.tar.xz"
	
	$out:=Folder(fk desktop folder).file("tool4d_arm64.tar.xz")
	
	$curl.perform([$URL; "-o"; $out; "-L"; "-#"])  //L:follow redirection
	
End if