njs/ngx
Types
Values
pub fn append(ar: array.Array(a), a: a) -> array.Array(a)
pub fn base64url_decode(data d: String) -> String
pub fn base64url_encode(data d: String) -> String
pub fn conf_file_path() -> String
pub fn conf_prefix() -> String
pub fn error_log_path() -> String
pub fn fetch_request(
resource r: request.Request,
options o: o,
) -> promise.Promise(response.Response)
Fetches a Request with the same options and response limits as fetch_url.
pub fn fetch_url(
resource r: String,
options o: o,
) -> promise.Promise(response.Response)
Fetches a URL. Options are forwarded to njs, including
max_response_body_size (non-negative, and enforced on decoded chunked data
in njs 1.0.2+). Invalid response framing rejects the promise.
pub fn get(o: JsObject, k: k) -> Result(JsObject, Nil)
safe for normal JS objects, not for r.variables
pub fn level_info() -> Int
pub fn level_warn() -> Int
pub fn make_array(ls: List(a)) -> array.Array(a)
pub fn make_query_string(q: json.Json) -> String
pub fn nginx_version() -> String
pub fn ngx_version_number() -> Int
pub fn njs_engine() -> String
pub fn njs_on(event: String, callback: fn() -> Nil) -> Nil
Register a lifecycle event callback. The only currently defined event
is "exit", called when a worker process shuts down cleanly.
pub fn njs_version() -> String
pub fn njs_version_number() -> Int
pub fn parse_query_string(q: String) -> json.Json