Skip to content

Java – 1.Triggers Reference

Pedro Rodrigues edited this page Feb 18, 2024 · 1 revision

HTTP

HttpRequestQf

Package: quickfaas.triggers.http.HttpRequestQf

Modifier & Type Method & Description
String
getBody()
Returns the request body.
String
getContentType()
Returns the value set by the Content-Type header. Example: application/json, text/plain, etc.
JsonElement
getFromJsonBody(String property)
Returns the element associated with the JSON property specified in the request body.
To use this method, the Content-Type header must be application/json.
String
getHttpMethod()
Returns the HTTP method utilized to do the request.
String
getQueryParameter(String parameter)
Returns the value of the given query parameter.

HttpResponseQf

Package: quickfaas.triggers.http.HttpResponseQf

Modifier & Type Method & Description
void
appendHeader(String header, String value)
Set a header to the request.
void
send(int status, String body)
Sends a response to the received request.
void
setContentType(String contentType)
Sets a value to the Content-Type header.

Storage

BlobQf

Package: quickfaas.triggers.storage.BlobQf

Modifier & Type Method & Description
String
getName()
Returns the blob name.

BucketEventQf

Package: quickfaas.triggers.storage.BucketEventQf

Modifier & Type Method & Description
String
getBucketName()
Returns the bucket name where the event occurred.
EventTypeQf
getType()
Returns the event type that occurred.

EventTypeQf

Package: quickfaas.triggers.storage.EventTypeQf

Constant Description
CREATE When a new blob is created.
DELETE When a blob is permanently deleted.
UPDATE When a blob is updated.
CUSTOM When none of the above event types occurred.