AWS_component is a component for 4D v14+ (it can be backported to 4D v13)
     Its purpose is to connect to Amazon Web Service (AWS)
     The component will do the authentication to AWS
     There are some AWS_* which are application to AWS in general
     There are currently some S3_* specific method to call the S3 REST API


Sample code : 

  // display notifications (by default it is off)
AWS_notificationsShowSet (True)
    
  // debugging messages (by default it is off)
AWS_debugSet (True)
    
  // load the parameters (auth and default region) from a local preference file
AWS_paramAuto 
     
// get bucket list
    
C_TEXT($vt_bucket;$vt_httpVerb;$vt_uri)
$vt_bucket:=""
$vt_httpVerb:=HTTP get method  //"GET" 
$vt_uri:="/"
    
ARRAY TEXT($tt_requestHeadersArray;0)
ARRAY TEXT($tt_responseHeadersArray;0)
C_BLOB($vx_requestBodyBlob;$vx_responseBodyBlob)
    
C_LONGINT($vl_httpReponseStatus)
$vl_httpReponseStatus:=S3_restApi ($vt_httpVerb;$vt_bucket;$vt_uri;->$tt_requestHeadersArray;->$vx_requestBodyBlob;->$tt_responseHeadersArray;->$vx_responseBodyBlob)
ASSERT($vl_httpReponseStatus=200)


Bruno LEGAY - Copyrights A&C Consulting - 2008
b.legay@ac-consulting.fr
www.ac-consulting.fr
