Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/fastify/fastify
/ functions
Functions
658 in github.com/fastify/fastify
⨍
Functions
658
◇
Types & classes
142
↓ 1,274 callers
Method
send
(...args: SendArgs<ReplyType>)
types/reply.d.ts:53
↓ 1,151 callers
Function
done
(err, a, b)
test/internals/hook-runner.test.js:35
↓ 969 callers
Method
inject
(opts: InjectOptions | string, cb: LightMyRequestCallback)
types/instance.d.ts:166
↓ 621 callers
Method
addHook
* `onRequest` is the first hook to be executed in the request lifecycle. There was no previous hook, the next hook will be `preParsing`. * Notice:
types/instance.d.ts:227
↓ 612 callers
Method
close
()
types/instance.d.ts:143
↓ 546 callers
Method
after
()
types/instance.d.ts:140
↓ 523 callers
Method
listen
(opts: FastifyListenOptions, callback: (err: Error | null, address: string) => void)
types/instance.d.ts:170
↓ 293 callers
Method
ready
()
types/instance.d.ts:174
↓ 271 callers
Method
code
(statusCode: Code)
types/reply.d.ts:49
↓ 260 callers
Method
route
(opts: RouteOptions<RawServer, RawRequest, RawReply, RouteGeneric, ContextConfig, SchemaCompiler, TypeProvider
types/instance.d.ts:181
↓ 204 callers
Function
fastify
* @param {import('./fastify.js').FastifyServerOptions} serverOptions
fastify.js:90
↓ 135 callers
Method
then
(fulfilled: () => void, rejected: (err: Error) => void)
types/reply.d.ts:73
↓ 124 callers
Method
toString
()
lib/content-type.js:176
↓ 120 callers
Method
addSchema
(schema: unknown)
types/instance.d.ts:136
↓ 104 callers
Method
header
(key: HttpHeader, value: any)
types/reply.d.ts:54
↓ 96 callers
Method
setErrorHandler
* Set a function that will be invoked whenever an exception is thrown during the request lifecycle.
types/instance.d.ts:472
↓ 72 callers
Method
write
(msg: string)
types/logger.d.ts:38
↓ 71 callers
Method
setNotFoundHandler
* Set the 404 handler
types/instance.d.ts:452
↓ 57 callers
Method
hasPlugin
(name: string)
types/instance.d.ts:161
↓ 52 callers
Method
from
* Create a ContentType instance from a header value. If the value has been * previously parsed, the cached instance will be returned. * @param {
lib/content-type.js:73
↓ 46 callers
Method
withTypeProvider
()
types/instance.d.ts:134
↓ 44 callers
Function
next
(err)
lib/hooks.js:119
↓ 43 callers
Method
type
(contentType: string)
types/reply.d.ts:64
↓ 40 callers
Method
getSchema
(schemaId: string)
types/instance.d.ts:137
↓ 40 callers
Method
validateInput
(input: any, schema: { [key: string]: any }, httpPart?: HTTPRequestPart)
types/request.d.ts:112
↓ 38 callers
Method
getValidationFunction
(httpPart: HTTPRequestPart)
types/request.d.ts:109
↓ 38 callers
Method
info
(arg1: unknown, arg2?: unknown, ...args: unknown[])
test/types/logger.tst.ts:49
↓ 36 callers
Method
add
(schema)
lib/schema-controller.js:62
↓ 36 callers
Function
cb
(err, value)
lib/reply.js:905
↓ 36 callers
Function
on
()
test/custom-http-server.test.js:54
↓ 32 callers
Method
status
(statusCode: Code)
types/reply.d.ts:50
↓ 27 callers
Method
compileValidationSchema
(schema: { [key: string]: any }, httpPart?: HTTPRequestPart)
types/request.d.ts:111
↓ 27 callers
Method
setValidatorCompiler
* Set the schema validator for all routes.
types/instance.d.ts:515
↓ 24 callers
Method
child
(bindings: Bindings, options?: ChildLoggerOptions)
types/logger.d.ts:28
↓ 22 callers
Method
hasRequestDecorator
(decorator: string | symbol)
types/instance.d.ts:159
↓ 22 callers
Method
printRoutes
* Prints the representation of the internal radix tree used by the router
types/instance.d.ts:577
↓ 20 callers
Method
getSchemas
()
types/instance.d.ts:138
↓ 19 callers
Method
getDecorator
(name: string | symbol)
types/reply.d.ts:80
↓ 18 callers
Method
error
(...args: unknown[])
test/types/logger.tst.ts:54
↓ 18 callers
Function
stepIn
()
test/toolkit.js:9
↓ 17 callers
Function
validate
()
test/internals/initial-config.test.js:81
↓ 16 callers
Method
addHttpMethod
* Add a non-standard HTTP method * * Methods defined by default include `GET`, `HEAD`, `TRACE`, `DELETE`, * `OPTIONS`, `PATCH`, `PUT` and `PO
types/instance.d.ts:564
↓ 16 callers
Method
hasRoute
(opts: Pick<RouteOptions<RawServer, RawRequest, RawReply, RouteGeneric, ContextConfig, SchemaCompiler, TypePro
types/instance.d.ts:207
↓ 16 callers
Method
warn
(...args: unknown[])
test/types/logger.tst.ts:53
↓ 15 callers
Method
getHeader
(key: HttpHeader)
types/reply.d.ts:56
↓ 15 callers
Function
request
(url, cleanup = () => { })
test/logger/logger-test-utils.js:28
↓ 14 callers
Function
reqIdGenFactory
* @param {string} [requestIdHeader] * @param {GenerateRequestId} [optGenReqId] * @returns {GenerateRequestId}
lib/req-id-gen-factory.js:16
↓ 14 callers
Method
setReplySerializer
* Set the reply serializer for all routes.
types/instance.d.ts:535
↓ 13 callers
Function
completed
()
test/genReqId.test.js:152
↓ 13 callers
Method
debug
(...args: unknown[])
test/types/logger.tst.ts:57
↓ 13 callers
Method
hasReplyDecorator
(decorator: string | symbol)
types/instance.d.ts:160
↓ 13 callers
Method
hijack
()
types/reply.d.ts:62
↓ 13 callers
Method
serializeInput
(input: { [key: string]: unknown }, schema: { [key: string]: unknown }, httpStatus?: string, contentType?: str
types/reply.d.ts:71
↓ 13 callers
Method
setChildLoggerFactory
* Hook function that is called when creating a child logger instance for each request * which allows for modifying or adding child logger bindings
types/instance.d.ts:505
↓ 13 callers
Function
throwIfAlreadyStarted
(msg)
fastify.js:463
↓ 12 callers
Method
addresses
()
types/instance.d.ts:133
↓ 12 callers
Function
endRouteHook
(doneOrPayload, done, doneValue)
test/route-hooks.test.js:9
↓ 12 callers
Method
findRoute
(opts: Pick<RouteOptions<RawServer, RawRequest, RawReply, RouteGeneric, ContextConfig, SchemaCompiler, TypePro
types/instance.d.ts:213
↓ 12 callers
Function
hookRunnerGenerator
(iterator)
lib/hooks.js:230
↓ 12 callers
Function
serialize
* This function runs when a payload that is not a string|buffer|stream or null * should be serialized to be streamed to the response. * This is the
lib/reply.js:1064
↓ 11 callers
Function
fn
()
test/internals/plugin.test.js:24
↓ 11 callers
Method
getSerializationFunction
(httpStatus: string, contentType?: string)
types/reply.d.ts:68
↓ 11 callers
Method
hasConstraintStrategy
(strategyName: string)
types/instance.d.ts:164
↓ 11 callers
Method
setSchemaController
* Set the schema controller for all routes.
types/instance.d.ts:530
↓ 10 callers
Method
addConstraintStrategy
(strategy: ConstraintStrategy<FindMyWayVersion<RawServer>, unknown>)
types/instance.d.ts:163
↓ 10 callers
Method
callNotFound
()
types/reply.d.ts:63
↓ 10 callers
Method
compileSerializationSchema
(schema: { [key: string]: unknown }, httpStatus?: string, contentType?: string)
types/reply.d.ts:70
↓ 10 callers
Function
fetchForwardedRequest
(fastifyServer, forHeader, path, protoHeader, hostHeader = 'fastify.test')
test/trust-proxy.test.js:9
↓ 10 callers
Function
getDefaultSchema
()
test/internals/reply-serialize.test.js:7
↓ 10 callers
Method
headers
(values: Partial<Record<HttpHeader, number | string | string[] | undefined>>)
types/reply.d.ts:55
↓ 10 callers
Method
setGenReqId
* Set a function that will generate a request-ids
types/instance.d.ts:479
↓ 10 callers
Function
testRequestValues
(t, req, options)
test/trust-proxy.test.js:23
↓ 9 callers
Function
extractGitHubLinks
(content)
scripts/validate-ecosystem-links.js:31
↓ 9 callers
Function
loadValidateEcosystemLinksModule
()
test/scripts/validate-ecosystem-links.test.js:8
↓ 9 callers
Method
redirect
(url: string, statusCode?: number)
types/reply.d.ts:60
↓ 9 callers
Method
serializer
(fn: (payload: any) => string)
types/reply.d.ts:65
↓ 9 callers
Method
setSerializerCompiler
* Set the schema serializer for all routes.
types/instance.d.ts:525
↓ 8 callers
Method
hasHeader
(key: HttpHeader)
types/reply.d.ts:59
↓ 8 callers
Function
normalizeSchema
(routeSchemas, serverOptions)
lib/schemas.js:58
↓ 8 callers
Function
onSendHookRunner
(functions, request, reply, payload, cb)
lib/hooks.js:278
↓ 8 callers
Function
wrapValidationError
(result, dataVar, schemaErrorFormatter)
lib/validation.js:256
↓ 7 callers
Function
checkGitHubRepo
(owner, repo, retries = 3)
scripts/validate-ecosystem-links.js:48
↓ 7 callers
Method
hasDecorator
(decorator: string | symbol)
types/instance.d.ts:158
↓ 7 callers
Method
isLogDisabled
* Checks whether request logging is disabled for the given request. * * @param {object} req Raw or Fastify request object. * @returns {boole
lib/log-controller.js:34
↓ 6 callers
Function
addRandomRoute
(server)
test/schema-feature.test.js:1463
↓ 6 callers
Function
createChildLogger
* Utility for creating a child logger with the appropriate bindings, logger factory * and validation. * @param {object} context * @param {import('.
lib/logger-factory.js:29
↓ 6 callers
Function
createLogController
(options)
lib/logger-factory.js:132
↓ 6 callers
Function
createServer
(options, httpHandler)
lib/server.js:27
↓ 6 callers
Function
doGet
(url)
test/internals/reply.test.js:23
↓ 6 callers
Function
getGenReqId
(contextServer, req)
lib/req-id-gen-factory.js:26
↓ 6 callers
Function
onErrorHook
(reply, error, cb)
lib/reply.js:938
↓ 6 callers
Function
onSendHook
(reply, payload)
lib/reply.js:551
↓ 6 callers
Method
requestCompleted
* Logs the outcome of a completed request. * Uses `error` level when an error is present, `info` otherwise. * * @param {Error | null} error
lib/log-controller.js:62
↓ 6 callers
Function
runTests
(t, fastifyServer)
test/decorator.test.js:120
↓ 6 callers
Function
sendTrailer
(payload, res, reply)
lib/reply.js:876
↓ 6 callers
Function
testExecutionHook
(hook)
test/route-hooks.test.js:17
↓ 5 callers
Function
addEcho
(fastify, method)
test/http-methods/custom-http-methods.test.js:7
↓ 5 callers
Function
callback
(err)
test/listen.5.test.js:26
↓ 5 callers
Method
defaultErrorLog
* Logs an error handled by the default error handler. * Uses `error` for 5xx status codes, `info` for 4xx. * * @param {Error} error T
lib/log-controller.js:81
↓ 5 callers
Method
getHeaders
()
types/reply.d.ts:57
next →
1–100 of 658, ranked by callers