Performs a DELETE request against the given path relative to this route and returns the server response.
Path relative to this route.
Optional
search: Record<string, any> | URLSearchParamsQuery string parameters for this request.
Optional
headers: Headers | Record<string, string>Additional headers to send with this request.
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.
Optional
search: Record<string, any> | URLSearchParamsQuery string parameters for this request.
Optional
headers: Headers | Record<string, string>Additional headers to send with this request.
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.
Path relative to this route.
Optional
search: Record<string, any> | URLSearchParamsQuery string parameters for this request.
Optional
headers: Headers | Record<string, string>Additional headers to send with this request.
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.
Optional
search: Record<string, any> | URLSearchParamsQuery string parameters for this request.
Optional
headers: Headers | Record<string, string>Additional headers to send with this request.
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.
Path relative to this route.
Optional
search: Record<string, any> | URLSearchParamsQuery string parameters for this request.
Optional
headers: Headers | Record<string, string>Additional headers to send with this request.
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.
Optional
search: Record<string, any> | URLSearchParamsQuery string parameters for this request.
Optional
headers: Headers | Record<string, string>Additional headers to send with this request.
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.
Path relative to this route.
Optional
body: anyBody of the request object.
Optional
search: Record<string, any> | URLSearchParamsQuery string parameters for this request.
Optional
headers: Headers | Record<string, string>Additional headers to send with this request.
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
.
Optional
body: anyBody of the request object. Must not be a string.
Optional
search: Record<string, any> | URLSearchParamsQuery string parameters for this request.
Optional
headers: Headers | Record<string, string>Additional headers to send with this request.
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.
Path relative to this route.
Optional
body: anyBody of the request object.
Optional
search: Record<string, any> | URLSearchParamsQuery string parameters for this request.
Optional
headers: Headers | Record<string, string>Additional headers to send with this request.
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
.
Optional
body: anyBody of the request object. Must not be a string.
Optional
search: Record<string, any> | URLSearchParamsQuery string parameters for this request.
Optional
headers: Headers | Record<string, string>Additional headers to send with this request.
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.
Path relative to this route.
Optional
body: anyBody of the request object.
Optional
search: Record<string, any> | URLSearchParamsQuery string parameters for this request.
Optional
headers: Headers | Record<string, string>Additional headers to send with this request.
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
.
Optional
body: anyBody of the request object. Must not be a string.
Optional
search: Record<string, any> | URLSearchParamsQuery string parameters for this request.
Optional
headers: Headers | Record<string, string>Additional headers to send with this request.
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.
Optional
options: RequestOptionsOptions for performing the request.
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"
}
});
Creates a new route relative to this route that inherits any of its default HTTP headers.
Path relative to this route.
Optional
headers: Headers | Record<string, string>Additional headers that will be sent with each request.
const db = new Database();
const foxx = db.route("/my-foxx-service");
const users = foxx.route("/users");
Represents an arbitrary route relative to an ArangoDB database.