Platforms to show: All Mac Windows Linux Cross-Platform

Back to CURLMBS class.

CURLMBS.AWSPresignURL(AWSAccessKeyId as String, AWSSecretAccessKey as String, Region as String, Service as String, Path as String, Domain as String, Verb as String = "GET", Expires as Integer = 86400, QueryParameters() as String = nil, Headers() as String = nil) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CURL MBS CURL Plugin 21.3 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Query predigend URL for Amazon Webservices.
Example
Dim URL As String = CURLMBS.AWSPresignURL( _
"AKIAIOSFODNN7EXAMPLE", _
"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", _
"us-east-1", _
"s3", _
"/test.txt", _
"examplebucket.s3.amazonaws.com", _
"GET", _
86400 )

Break // see URL in debugger

This implements AWS4-HMAC-SHA256 pre-signature for credentials.

Works also for other compatible S3 services beside Amazon's like the one from Wasabi or Dell ECS.

ParameterDescriptionExample
AWSAccessKeyIdYour access key for AWS.
AWSSecretAccessKeyYour secret.
RegionThe region to use."eu-central-1"
ServiceThe service to use."s3"
PathThe path for the URL. Should always start with "/"."/bucketname/test.jpg"
DomainOptional the domain to use. By default we just build it from region and service."s3.eu-central-1.amazonaws.com" or "s3-ap-southeast-2.amazonaws.com"
VerbThe HTTP Operation to do. Can be POST, PUT, GET or DELETE. Default is GET."GET"
ExpiresExpiration duration. Provides the time period, in seconds, for which the generated presigned URL is valid. For example, 86400 (24 hours). This value is an integer. The minimum value you can set is 1, and the maximum is 604800 (seven days). A presigned URL can be valid for a maximum of seven days because the signing key you use in signature calculation is valid for up to seven days. Default is 86400 for one day.
QueryParametersList of query parameters to include."test=abc"
HeadersExtra HTTP headers to include. Here you can specify various headers to include in signature and request.

Returns the pre-signed URL. May raise an exception in case of error.

CURLMBS.LoadAPI

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CURL MBS CURL Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Loads the default CURL library.

This method is called by the constructor. So you don't need this except you want to test explicit with APILoaded whether the loading worked before you use the CURLMBS class.

Loads the "libCURL.dll" Windows library (with SSL support this one max require OpenSSL).
Loads on Mac OS X and Linux the libCURL file in /usr/lib.

CURLMBS.LoadErrorString as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CURL MBS CURL Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
The last error string from the LoadLibrary function.

CURLMBS.LoadLibrary(file as folderitem) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CURL MBS CURL Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Loads the CURL library from the given path.

You only need to use this function if you have your own CURL Library.

Loads a Windows DLL, a Linux shared library or a Mac OS X shared library from the given path.

Returns true on success.

See also:

CURLMBS.LoadLibrary(path as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CURL MBS CURL Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Loads the CURL library from the given path.

You only need to use this function if you have your own CURL Library.

Loads a Windows DLL, a Linux shared library or a Mac OS X shared library from the given path.

Returns true on success.

See also:

CURLMBS.ProcessRelativeURL(BaseURL as String, RelativeURL as String) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CURL MBS CURL Plugin 23.4 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Processes an URL to come from relative URL to a new absolute URL.
Example
Dim baseURL As String = "https://monkeybreadsoftware.net/themes.shtml"
Dim RelativeURL As String = "topic-curl.shtml"

Dim URL As String = CURLMBS.ProcessRelativeURL(baseURL, RelativeURL)
Break

Raises an UnsuppportedOperationException in case of failure.

The items on this page are in the following plugins: MBS CURL Plugin.


The biggest plugin in space...