ilusm.dev

req

HTTP client library (axios/fetch style).

Load with: use req

Quick example

use req

result = reqbs("value", "value")
prn(result)

Functions

Request config

reqcf()

Performs the operation.

reqbs(c, u)

Performs the operation. Takes c, u.

reqhd(c, k, v)

Performs the operation. Takes c, k, v.

reqto(c, t)

Converts to another format. Takes c, t.

reqag(c, ag)

Performs the operation. Takes c, ag.

Methods

reqgt(cf, url)

Performs the operation. Takes cf, url.

reqpo(cf, url, dt)

Performs the operation. Takes cf, url, dt.

reqpu(cf, url, dt)

Performs the operation. Takes cf, url, dt.

reqde(cf, url)

Decodes. Takes cf, url.

reqpa(cf, url, dt)

Parses. Takes cf, url, dt.

reqhd(cf, url)

Performs the operation. Takes cf, url.

reqop(cf, url)

Opens a connection or resource. Takes cf, url.

Core request

reqmk(cf, mt, url, dt)

Creates a new instance. Takes cf, mt, url, dt.

Response helpers

reqjs(rs)

Performs the operation. Takes rs.

reqtx(rs)

Performs the operation. Takes rs.

rqblb(rs)

Performs the operation. Takes rs.

rqckh(rs, k)

Performs the operation. Takes rs, k.

rqckc(rs)

Performs the operation. Takes rs.

Query params

reqqp(obj)

Performs the operation. Takes obj.

Form data

reqfm(obj)

Performs the operation. Takes obj.

File upload

reqfl(flp, fn)

Performs the operation. Takes flp, fn.

Stream

reqst(cf, url)

Sets a value or starts a process. Takes cf, url.

Interceptors

reqin(cf, rqfn, rsfn)

Initialises. Takes cf, rqfn, rsfn.

Cancel token

reqct()

Performs the operation.

reqcn(tk)

Performs the operation. Takes tk.

Batch

reqal(cf, rqs)

Performs the operation. Takes cf, rqs.

Convenience

reqfe(url)

Performs the operation. Takes url.

reqj0(url)

Performs the operation. Takes url.

reqdl(url, pt)

Deletes an item. Takes url, pt.

Module aliases

These are the public-facing names you call with use req:

  • req.requp(c, url, data)

Notes

  • HTTP request helpers - build, send, parse responses.