Performs a DELETE request against the given path relative to this route and returns the server response.
const db = new Database();
const foxx = db.route("/my-foxx-service");
const res = await foxx.delete("/users/admin");
Performs a DELETE request against the given path relative to this route and returns the server response.
const db = new Database();
const foxx = db.route("/my-foxx-service");
const user = foxx.roue("/users/admin");
const res = await user.delete();
Performs a GET request against the given path relative to this route and returns the server response.
const db = new Database();
const foxx = db.route("/my-foxx-service");
const res = await foxx.get("/users", { offset: 10, limit: 5 });
Performs a GET request against the given path relative to this route and returns the server response.
const db = new Database();
const foxx = db.route("/my-foxx-service");
const users = foxx.route("/users");
const res = await users.get({ offset: 10, limit: 5 });
Performs a HEAD request against the given path relative to this route and returns the server response.
const db = new Database();
const foxx = db.route("/my-foxx-service");
const res = await foxx.head("/users", { offset: 10, limit: 5 });
Performs a HEAD request against the given path relative to this route and returns the server response.
const db = new Database();
const foxx = db.route("/my-foxx-service");
const users = foxx.route("/users");
const res = await users.head({ offset: 10, limit: 5 });
Performs a PATCH request against the given path relative to this route and returns the server response.
const db = new Database();
const foxx = db.route("/my-foxx-service");
const res = await foxx.patch("/users/admin", { password: "admin" });
Performs a PATCH request against the given path relative to this route and returns the server response.
Note: body
must not be a string
.
const db = new Database();
const foxx = db.route("/my-foxx-service");
const user = foxx.route("/users/admin")
const res = await user.patch({ password: "admin" });
Performs a POST request against the given path relative to this route and returns the server response.
const db = new Database();
const foxx = db.route("/my-foxx-service");
const res = await foxx.post("/users", {
username: "admin",
password: "hunter2"
});
Performs a POST request against the given path relative to this route and returns the server response.
Note: body
must not be a string
.
const db = new Database();
const foxx = db.route("/my-foxx-service");
const users = foxx.route("/users");
const res = await users.post({
username: "admin",
password: "hunter2"
});
Performs a PUT request against the given path relative to this route and returns the server response.
const db = new Database();
const foxx = db.route("/my-foxx-service");
const res = await foxx.put("/users/admin/password", { password: "admin" });
Performs a PUT request against the given path relative to this route and returns the server response.
Note: body
must not be a string
.
const db = new Database();
const foxx = db.route("/my-foxx-service");
const password = foxx.route("/users/admin/password");
const res = await password.put({ password: "admin" });
Performs an arbitrary HTTP request relative to this route and returns the server response.
const db = new Database();
const foxx = db.route("/my-foxx-service");
const res = await foxx.request({
method: "POST",
path: "/users",
body: {
username: "admin",
password: "hunter2"
}
});
Optional
options: RequestOptionsOptions for performing the request.
Creates a new route relative to this route that inherits any of its default HTTP headers.
const db = new Database();
const foxx = db.route("/my-foxx-service");
const users = foxx.route("/users");
Path relative to this route.
Optional
headers: HeadersAdditional headers that will be sent with each request.
Generated using TypeDoc
Represents an arbitrary route relative to an ArangoDB database.