Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

CURLSMBS.SetupAWS(AWSAccessKeyId as String, AWSSecretAccessKey as String, Region as String, Service as String, Path as String, Domain as String, Verb as String, HashedPayload as String = "", Headers() as String = nil, queryParameters() as string = nil) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CURL MBS CURL Plugin 17.2 Yes Yes Yes Yes No
Function: Setup CURL to transfer to Amazon Webservices.
This implements AWS4-HMAC-SHA256 signature for credentials, sets authentication, URL, HTTP Headers and other parameters.
For upload or post, please set input parameters first.

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 "/"."/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."PUT"
HashedPayloadThe hashed payload. If empty, we calculate it automatically from input data or postfields. This is a lowercase hex SHA256.
HeadersOptional extra HTTP headers to include."x-amz-acl: public-read"
queryParametersOptional query parameter list with entries like "key=value", URL encoded.

Returns true on success or false on failure.

Feedback, Comments & Corrections

CURLSMBS.SetupOAuth(ConsumerKey as String, ConsumerSecret as String, AccessToken as String, AccessTokenSecret as String, HTTPVerb as String, URL as String, Parameters() as String = nil, Headers() as String = nil, Datas() as String = nil, Nonce as String = "", Timestamp as String = "", HMAC as String = "", Verifier as String = "") as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CURL MBS CURL Plugin 18.3 Yes Yes Yes Yes No
Function: Setups an OAuth signed transfer.
The plugin calculates the signature and adds headers for authorization to the CURL handle.
Sets URL with parameters and optionally data values for POST.

ConsumerKeyThe oauth consumer key."xvz1evFS4wEEPTGEFPHBog"
ConsumerSecretThe oauth consumer secret."kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw"
AccessTokenThe oauth access token."370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb"
AccessTokenSecretThe oauth access token secret. Can be empty if not yet known."LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE"
HTTPVerbThe HTTP verb. e.g. POST, PUT, GET, DELETE. Default if empty is GET."POST"
URLThe URL to query without parameters."https://api.twitter.com/1.1/statuses/update.json"
ParametersList of parameters. Can be empty. Please pass list with newline as delimiter. Values should be URL encoded already."include_entities=true"
HeadersList of additional header entries to include. Can be empty. We automatically set Authorization header."Accept: application/json¶Content-Type: application/json"
DatasData value list for POST."status=Hello¶others=123"
NonceThe nonce value. If empty, we generate it automatically for you."kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg"
TimestampThe timestamp to use for signature. If empty, we query current timestamp (same as you calling Time.UnixTimeStamp)1318622958
HMACWhich HMAC algorithm to use. Can be HMAC-SHA512, HMAC-SHA256 or HMAC-SHA1. Default is HMAC-SHA1 if parameter is missing or empty."HMAC-SHA1"
VerifierThe verifier. Usually an ID shown on a website after login to the service and authorization of an app."3456789"

Feedback, Comments & Corrections

CURLSMBS.UseSystemCertificates as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CURL MBS CURL Plugin 17.2 Yes Yes No Yes No
Function: Read certificate from system and installs them in CURL session,.
For macOS and Windows we load the available certificates from keychain or Windows Certificate Store and pass them to CURL. This is better than having no certificates at all.
Even better is normally to provide a cacert.pem file with only the expected certificates.

Returns number of certificates loaded.

Feedback, Comments & Corrections

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

MBS Xojo Plugins