ilusm.dev

ftc

# ftc - fetch/http client for frontend.

Load with: use ftc

Quick example

use ftc

result = ftcge("value")
prn(result)

Functions

Request builder

ftcne()

Creates a new instance.

ftcge(u)

Gets or retrieves a value. Takes u.

ftcps(u)

Performs the operation. Takes u.

ftcpu(u)

Performs the operation. Takes u.

ftcde(u)

Decodes. Takes u.

ftchd(r, k, v)

Performs the operation. Takes r, k, v.

ftcjs(r)

Performs the operation. Takes r.

ftcbd(r, b)

Performs the operation. Takes r, b.

ftcob(r, o)

Performs the operation. Takes r, o.

ftctm(r, t)

Performs the operation. Takes r, t.

Execute fetch

ftcgo(r)

Performs the operation. Takes r.

Response helpers (wrap fetch result)

ftcok(r)

Performs the operation. Takes r.

ftcjs(r)

Performs the operation. Takes r.

ftctx(r)

Performs the operation. Takes r.

Simple helpers

httpg(u)

Performs the operation. Takes u.

httpp(u, d)

Performs the operation. Takes u, d.

httpp(u, d)

Performs the operation. Takes u, d.

httpd(u)

Performs the operation. Takes u.

Query builder

qryne()

Creates a new instance.

qryad(q, k, v)

Adds an item. Takes q, k, v.

qryst(q)

Sets a value or starts a process. Takes q.

Retry wrapper

ftcre(r, n, d)

Performs the operation. Takes r, n, d.

Cancelable request (via AbortController)

ftcca()

Performs the operation.

ftcgo(r, ab)

Performs the operation. Takes r, ab.

Notes

  • Fetch / HTTP client - GET, POST, streaming responses.