An incoming HTTP request;
An outgoing HTTP response;
Different log levels, from most important to least important.
Adds a header value without overriding previous values.
Decodes all components of a URI path.
Encodes all (non-slash) special characters in a URI path.
Makes sure the input path has exactly 1 slash at the end. Multiple slashes will get merged into one. If there is no slash it will be added.
Path to check.
The potentially changed path.
Gets a logger instance for the given class instance.
The returned type of logger depends on the configured LoggerFactory in {@link Setup}.
The following shows a typical pattern on how to create loggers:
class MyClass {
protected readonly logger = getLoggerFor(this);
}
If no class is applicable, a logger can also be created as follows:
const logger = getLoggerFor('MyFunction');
A class instance or a class string name.
Checks if the identifier corresponds to a container identifier.
Identifier to check.
Checks if the path corresponds to a container path (ending in a /).
Path to check.
Determines whether the object is a RepresentationMetadata
.
Determines whether the object is a ResourceIdentifier
.
Parses an Accept-Charset header string.
The Accept-Charset header string.
An array of AcceptCharset objects, sorted by weight.
Parses an Accept-Encoding header string.
The Accept-Encoding header string.
An array of AcceptEncoding objects, sorted by weight.
Parses an Accept-Language header string.
The Accept-Language header string.
An array of AcceptLanguage objects, sorted by weight.
Parses a Forwarded header value.
The Forwarded header value.
The parsed Forwarded header.
Parses a list of split parameters and checks their validity.
A list of split parameters (token [ "=" ( token / quoted-string ) ])
The double quoted strings that need to be replaced.
An array of name/value objects corresponding to the parameters.
Helper function to convert a Readable into an array of quads.
The readable object.
The content-type of the stream.
A promise containing the array of quads.
Pipes one stream into another and emits errors of the first stream with the second. In case of an error in the first stream the second one will be destroyed with the given error. This will also make the stream Guarded.
Initial readable stream.
The destination for writing data.
Optional function that takes the error and converts it to a new error.
The destination stream.
Generates a quad with the given subject/predicate/object and pushes it to the given array.
Joins all strings of a stream.
Stream of strings.
The joined string.
Resets the global logger factory to undefined.
This typically only needs to be called during testing. Call this at your own risk.
Helper function for serializing an array of quads, with as result a Readable object.
The array of quads.
The content-type to serialize to.
The Readable object.
Sets the global logger factory. This will cause all loggers created by getLoggerFor to be delegated to a logger from the given factory.
A logger factory.
Splits the input string on commas, trims all parts and filters out empty ones.
Input header string.
Converts a URI path to the canonical version by splitting on slashes, decoding any percent-based encodings, and then encoding any special characters.
Replaces all double quoted strings in the input string with "0"
, "1"
, etc.
The Accept header string.
The transformed string and a map with keys "0"
, etc. and values the original string that was there.
Makes sure the input path has no slashes at the end.
Path to check.
The potentially changed path.
Agent metadata related to pod generation.