diff --git a/README.md b/README.md index 9507b09..60123fa 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Axon is a backend library who tries to be simple and powerfull. Currently Axon is 2X faster than Express. :D please checkout [Axon Benchmarks](./benchmarks/README.md) Latest change: -- `text/plain` response in core default response errors bug fixed. +- `CORS` config added to AxonCore. - Plugin manager system added to core. (Document will update soon - 2024/10/24) diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js index b245847..7041108 100644 --- a/docs/assets/navigation.js +++ b/docs/assets/navigation.js @@ -1,5 +1 @@ -<<<<<<< HEAD -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAACoWSsWrDMBBA/+Vm0ySmSVtvxRC6BIrX0kHYZ0dEObm6M3Up+fcMSrGj2taqp/c4dPr4BcFeIIPX3lJuHUICrZIjZFAaxYy8+iMPRzkbSOCkqYJskz5fkn92bqnWzdDQJOhqVY4y/sp9LN3ugti76RpNsyGPY5ECubXEeEBm1eBsLbi3lH1DVaHjydSNLekFfnXIMqnf2LLuB53xPYy9Sm4dh3uSn3ZYEU+uaP3ytNmmo1ZuSZw1Bl3YGUiscdBVZfBbjf+dbwwk1iDsZU+h709jbmE7Gc9fd1SKtsQrT+793ePl8wqLHt3bMgMAAA==" -======= -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAACoWSwY6CQAxA/6VnsihZdeW2ITF7MdlwNR4mUHDi2GGnJWKM/+5h3IAocO3re+mhuysINgIxfDeWEusQAqiUHCCGzChm5PCffBzkZCCAo6Yc4nn0dQte7MRSocu2oUnQFSrrZPzKcyxaLHuxX1OXmgZDHk9FUuTKEuMWmVWJg7Xe3lj2B1WOjt+mHmxMT/GvRpa3+oON6/7QAd/DsUBiSZw1Bl2bkEuFHLak58/Wq/ki6jS2Os8NnlX3V3yjJVMNwkY21Pf9dMpNbS3d+4uaMtGWOPTk2V9+3vZ32Cr90OYCAAA=" ->>>>>>> dcff1c2d383ff73442e501794ffbc565204741a4 +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAACoWSsWrDMBBA/+Vm0ySmSVtvxRC6BIrX0kHYZ0dEObm6M3Up+fcMSrGj2taqp/c4dPr4BcFeIIPX3lJuHUICrZIjZFAaxYy8+iMPRzkbSOCkqYJskz5fkn92bqnWzdDQJOhqVY4y/sp9LN3ugti76RpNsyGPY5ECubXEeEBm1eBsLbi3lH1DVaHjydSNLekFfnXIMqnf2LLuB53xPYy9Sm4dh3uSn3ZYEU+uaP3ytNmmo1ZuSZw1Bl3YGUiscdBVZfBbjf+dbwwk1iDsZU+h709jbmE7Gc9fd1SKtsQrT+793ePl8wqLHt3bMgMAAA==" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js index 284c4ff..4e48aa4 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1,5 +1 @@ -<<<<<<< HEAD -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAACq2abW/iOBDHv4t5m6X1ONDCu26P7Z103a6Kbt9EVZUSQ6MLMZeEbldVv/vJ5GkcT4qBvgKRmf+Mxz8/xOaNZepXzqbBG/s3TiM2HfseS8O1ZFN2r7aFzJjHtlnCpmy5TRdFrNL8rHwwfC7WCfPYIgnzXOZsyti7V8vAaNzqyP+2Mi8aoTgtZLYMFzI/qx59KMXPoc3pSUW/9wkNKqNWrcijL3H+JU6fZRYXMmIe24SZTAuUXU/ATZiF63xvyMbs2KBmwfKNSnNJRy2fuZcsL8Ji29MCpDVo7FybUCXZhh2PRqJtxeNj8Xuzvw1V3GFjjlpEhBtWadKV+1OGkczIxlaPPq4bXDZSV68qvVZZ24DK46x+8KHSiEOjtFBpXmTbRaGyj8UGpiVdiCYvVIFzv807UWH0I9mu4nRPMMPw+FjXKl3GK4dYjeHxsXYTj0Oo2u64SKtEPYXJbRxFifwV7iNgQJgf2cI4L+TeXquN3GOg8VE/7nQaGiamhfss88fs6z83joKD2vjjNlRJ9gT8++7mZnbvGrGxPj3k48/Z/de7+eyw0MjrlBTuZ/Mfd9/ns8fb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sAETJmBCIyNIOoUNmDAB8zUygqTTtwHzTcD8HWAknb4NmG8C5kNfsX2bL9/ky9fE+CTZvs2X39ls+b2Bie1W+dNuf/sis0JGf5X73CBoNtFv7LHa/DYb7Dc2ZtO3d49B9SmqTx+qT19/vrdb4d2vzW5YP9N5VMc9z/URSxuqvZZ7YzBxE3tV6WJ3fdfKIJXLg0QW1bFjK8VHrRYfHSKW22KAxMBdbFO9aLdCAgmJC2ehrDqHXdcn6yg1jlLjTorl7TuSQApOAsYtaKszaXXcEFigl19UI6Tju7VI95rRonPUpHM3CXxqh5JBSsItmUg+bU0U0UDkYyeN6jCTGmmoOsKtaeX95xq9sqPcBMpNOMkRSV20Im5QlwcnqMxo5PturarvWVFbfNQWtxlN30UTcwcaU9yt07WQPdw5ooc7NkuFUVbejiMdNES52xhN1GpljiuOeom7dVMp8vgisyeVmxmhDuNuc/U6fO3MXQLVWbg1q7z2SFUR1tdXaGig/ge3/m9uUZAKKhM4towcWj7qfN9taJUHUqhAaOYQbrno09+lueagsgi3xStVxbK8NEV1wcuEW2dVh+15edhe/30JZYYmH+HWYfWdG8oL1QjcsK7/C4YyQYm4SdSXG4vmcgOpoVIJN72s/gseGmJohDlq1P9KQxAiBg8Seaz2GkaZOFp8uNsan1X/UWxF0LBwmxLL63NZXp+jjkedBm5VthFE+zG3odFcLqDuRjOGcKjKg8c28UYmcSrZNHh4f/8fHjl3ReQpAAA="; -======= -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAACqWZbW/iOBDHv4t5m6XMmPD0rttjeyddd1etbt9EFUqJ20YXYi4JbVcV3/1k8uAxNmDaV6B45j/j8c8Pcd5ZIV9LNove2b9pnrDZaBiwPF4JNmO3clOJggVsU2Rsxh43+bJKZV5e1A3952qVsYAts7gsRclmjG2DVgbDkdYR/21EWXVCaV6J4jFeivKiaToqBQPUOT3I5PcpoV5jpNWqMvmSll/S/FkUaSUSFrB1XIi8ItkdCLiOi3hVngzZmX00qFmwci3zUrij1m3+JSuruNo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vZMW2ICBCRhoZICkE2zAwAQMNDJA0gk2YGACBhoZIOkEGzAwARM7wEg6hQ2YMAETGhlB0ilswIQJmNDICJJOYQMmOgvhbiUk6RTEWmgCJjQygl5HbcCECZjQyAiSTmEDJkzARC9gwgZMmIAJjYwgyRY2YMIETGhkBEmnsAETJmBCIyNIOoUNmDAB8zUygqTTtwHzTcD8HWAknb4NmG8C5kNfsX2bL9/ky9fE+CTZvs2X39ls+b2Bie1W+dNuf/sis0JGf5X73CBoNtFv7LHa/DYb7Dc2ZtO3d49B9SmqTx+qT19/vrdb4d2vzW5YP9N5VMc9z/URSxuqvZZ7YzBxE3tV6WJ3fdfKIJXLg0QW1bFjK8VHrRYfHSKW22KAxMBdbFO9aLdCAgmJC2ehrDqHXdcn6yg1jlLjTorl7TuSQApOAsYtaKszaXXcEFigl19UI6Tju7VI95rRonPUpHM3CXxqh5JBSsItmUg+bU0U0UDkYyeN6jCTGmmoOsKtaeX95xq9sqPcBMpNOMkRSV20Im5QlwcnqMxo5PturarvWVFbfNQWtxlN30UTcwcaU9yt07WQPdw5ooc7NkuFUVbejiMdNES52xhN1GpljiuOeom7dVMp8vgisyeVmxmhDuNuc/U6fO3MXQLVWbg1q7z2SFUR1tdXaGig/ge3/m9uUZAKKhM4towcWj7qfN9taJUHUqhAaOYQbrno09+lueagsgi3xStVxbK8NEV1wcuEW2dVh+15edhe/30JZYYmH+HWYfWdG8oL1QjcsK7/C4YyQYm4SdSXG4vmcgOpoVIJN72s/gseGmJohDlq1P9KQxAiBg8Seaz2GkaZOFp8uNsan1X/UWxF0LBwmxLL63NZXp+jjkedBm5VthFE+zG3odFcLqDuRjOGcKjKg8c28UYmcSrZNHh4f/8fHjl3ReQpAAA="; \ No newline at end of file diff --git a/docs/classes/AxonCore.html b/docs/classes/AxonCore.html index f36e256..81bdbcc 100644 --- a/docs/classes/AxonCore.html +++ b/docs/classes/AxonCore.html @@ -1,37 +1,18 @@ -<<<<<<< HEAD -AxonCore | @mr-mkz/axon

Class AxonCore

Constructors

constructor -======= -AxonCore | @mr-mkz/axon

Class AxonCore

Constructors

constructor ->>>>>>> dcff1c2d383ff73442e501794ffbc565204741a4 +AxonCore | @mr-mkz/axon

Class AxonCore

Constructors

Methods

  • Start listening to http incoming requests

    +

Constructors

Methods

  • Start listening to http incoming requests

    Parameters

    • host: string = "127.0.0.1"

      server host address

    • port: number = 8000

      server port

    • Optionalcallback: (() => void)

      callback a function to run after starting to listen

      -
        • (): void
        • Returns void

    Returns Promise<void>

  • A method to config core as you want

    +
      • (): void
      • Returns void

Returns Promise<void>

  • A method to config core as you want

    If you want to config the core, use this method before all other methods.

    Parameters

    Returns Promise<void>

  • Loads a specified Axon plugin using the plugin loader.

    +

Returns Promise<void>

  • Loads a specified Axon plugin using the plugin loader.

    Parameters

    • plugin: AxonPlugin

      The plugin to be loaded. It should be an instance of AxonPlugin.

      -

    Returns Promise<void>

  • loads created routes

    +

Returns Promise<void>

-======= -

Constructors

Methods

  • Start listening to http incoming requests

    -

    Parameters

    • host: string = "127.0.0.1"

      server host address

      -
    • port: number = 8000

      server port

      -
    • Optionalcallback: (() => void)

      callback a function to run after starting to listen

      -
        • (): void
        • Returns void

    Returns Promise<void>

  • A method to config core as you want

    -

    If you want to config the core, use this method before all other methods.

    -

    Parameters

    Returns Promise<void>

  • Loads a specified Axon plugin using the plugin loader.

    -

    Parameters

    • plugin: AxonPlugin

      The plugin to be loaded. It should be an instance of AxonPlugin.

      -

    Returns Promise<void>

  • loads created routes

    -

    Parameters

    • router: AxonRouter

      instance of Router which routes setted with it.

      -
    • Optionalprefix: string

    Returns Promise<void>

->>>>>>> dcff1c2d383ff73442e501794ffbc565204741a4 +
  • Optionalprefix: string
  • Returns Promise<void>

    diff --git a/docs/functions/Router.html b/docs/functions/Router.html index 8f966d7..8c6db88 100644 --- a/docs/functions/Router.html +++ b/docs/functions/Router.html @@ -1,5 +1 @@ -<<<<<<< HEAD -Router | @mr-mkz/axon

    Function Router

    -======= -Router | @mr-mkz/axon

    Function Router

    ->>>>>>> dcff1c2d383ff73442e501794ffbc565204741a4 +Router | @mr-mkz/axon

    Function Router

    diff --git a/docs/index.html b/docs/index.html index f5879c6..5efc37c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -48,10 +48,7 @@
  • Configurable core
  • Plugin manager (You can create your own plugins and use them in other projects)
  • Controllers and Middlewares
  • -<<<<<<< HEAD
  • Default cors configuration method
  • -======= ->>>>>>> dcff1c2d383ff73442e501794ffbc565204741a4

    More features soon...

    -<<<<<<< HEAD -
    notFound?: string

    response error message for 404 not found response from core

    +
    notFound?: string

    response error message for 404 not found response from core

    use {path} to show request method.

    -
    serverError?: string

    response error message for 500 internal server error response from core

    -
    -======= -
    notFound?: string

    response error message for 404 not found response from core

    -

    use {path} to show request method.

    -
    serverError?: string

    response error message for 500 internal server error response from core

    -
    ->>>>>>> dcff1c2d383ff73442e501794ffbc565204741a4 +
    serverError?: string

    response error message for 500 internal server error response from core

    +
    diff --git a/docs/interfaces/Headers.html b/docs/interfaces/Headers.html index 1ca2ad0..a83c7ee 100644 --- a/docs/interfaces/Headers.html +++ b/docs/interfaces/Headers.html @@ -1,8 +1,4 @@ -<<<<<<< HEAD -Headers | @mr-mkz/axon

    Interface Headers

    interface Headers {
        accept?: string | string[];
        accept-charset?: string | string[];
        accept-encoding?: string | string[];
        accept-language?: string | string[];
        accept-ranges?: string;
        access-control-allow-credentials?: string;
        access-control-allow-headers?: string;
        access-control-allow-methods?: string;
        access-control-allow-origin?: string;
        access-control-expose-headers?: string;
        access-control-max-age?: string;
        access-control-request-headers?: string;
        access-control-request-method?: string;
        age?: string;
        allow?: string;
        authorization?: string;
        cache-control?: string;
        cdn-cache-control?: string;
        connection?: string | string[];
        content-disposition?: string;
        content-encoding?: string;
        content-language?: string;
        content-length?: string | number;
        content-location?: string;
        content-range?: string;
        content-security-policy?: string;
        content-security-policy-report-only?: string;
        cookie?: string | string[];
        date?: string;
        dav?: string | string[];
        dnt?: string;
        etag?: string;
        expect?: string;
        expires?: string;
        forwarded?: string;
        from?: string;
        host?: string;
        if-match?: string;
        if-modified-since?: string;
        if-none-match?: string;
        if-range?: string;
        if-unmodified-since?: string;
        last-modified?: string;
        link?: string | string[];
        location?: string;
        max-forwards?: string;
        origin?: string;
        prgama?: string | string[];
        proxy-authenticate?: string | string[];
        proxy-authorization?: string;
        public-key-pins?: string;
        public-key-pins-report-only?: string;
        range?: string;
        referer?: string;
        referrer-policy?: string;
        refresh?: string;
        retry-after?: string;
        sec-websocket-accept?: string;
        sec-websocket-extensions?: string | string[];
        sec-websocket-key?: string;
        sec-websocket-protocol?: string | string[];
        sec-websocket-version?: string;
        server?: string;
        set-cookie?: string | string[];
        strict-transport-security?: string;
        te?: string;
        trailer?: string;
        transfer-encoding?: string;
        upgrade?: string;
        upgrade-insecure-requests?: string;
        user-agent?: string;
        vary?: string;
        via?: string | string[];
        warning?: string;
        www-authenticate?: string | string[];
        x-content-type-options?: string;
        x-dns-prefetch-control?: string;
        x-frame-options?: string;
        x-xss-protection?: string;
    }

    Hierarchy

    • OutgoingHttpHeaders
      • Headers

    Properties

    accept? -======= -Headers | @mr-mkz/axon

    Interface Headers

    interface Headers {
        accept?: string | string[];
        accept-charset?: string | string[];
        accept-encoding?: string | string[];
        accept-language?: string | string[];
        accept-ranges?: string;
        access-control-allow-credentials?: string;
        access-control-allow-headers?: string;
        access-control-allow-methods?: string;
        access-control-allow-origin?: string;
        access-control-expose-headers?: string;
        access-control-max-age?: string;
        access-control-request-headers?: string;
        access-control-request-method?: string;
        age?: string;
        allow?: string;
        authorization?: string;
        cache-control?: string;
        cdn-cache-control?: string;
        connection?: string | string[];
        content-disposition?: string;
        content-encoding?: string;
        content-language?: string;
        content-length?: string | number;
        content-location?: string;
        content-range?: string;
        content-security-policy?: string;
        content-security-policy-report-only?: string;
        cookie?: string | string[];
        date?: string;
        dav?: string | string[];
        dnt?: string;
        etag?: string;
        expect?: string;
        expires?: string;
        forwarded?: string;
        from?: string;
        host?: string;
        if-match?: string;
        if-modified-since?: string;
        if-none-match?: string;
        if-range?: string;
        if-unmodified-since?: string;
        last-modified?: string;
        link?: string | string[];
        location?: string;
        max-forwards?: string;
        origin?: string;
        prgama?: string | string[];
        proxy-authenticate?: string | string[];
        proxy-authorization?: string;
        public-key-pins?: string;
        public-key-pins-report-only?: string;
        range?: string;
        referer?: string;
        referrer-policy?: string;
        refresh?: string;
        retry-after?: string;
        sec-websocket-accept?: string;
        sec-websocket-extensions?: string | string[];
        sec-websocket-key?: string;
        sec-websocket-protocol?: string | string[];
        sec-websocket-version?: string;
        server?: string;
        set-cookie?: string | string[];
        strict-transport-security?: string;
        te?: string;
        trailer?: string;
        transfer-encoding?: string;
        upgrade?: string;
        upgrade-insecure-requests?: string;
        user-agent?: string;
        vary?: string;
        via?: string | string[];
        warning?: string;
        www-authenticate?: string | string[];
        x-content-type-options?: string;
        x-dns-prefetch-control?: string;
        x-frame-options?: string;
        x-xss-protection?: string;
    }

    Hierarchy

    • OutgoingHttpHeaders
      • Headers

    Properties

    accept? ->>>>>>> dcff1c2d383ff73442e501794ffbc565204741a4 +Headers | @mr-mkz/axon

    Interface Headers

    interface Headers {
        accept?: string | string[];
        accept-charset?: string | string[];
        accept-encoding?: string | string[];
        accept-language?: string | string[];
        accept-ranges?: string;
        access-control-allow-credentials?: string;
        access-control-allow-headers?: string;
        access-control-allow-methods?: string;
        access-control-allow-origin?: string;
        access-control-expose-headers?: string;
        access-control-max-age?: string;
        access-control-request-headers?: string;
        access-control-request-method?: string;
        age?: string;
        allow?: string;
        authorization?: string;
        cache-control?: string;
        cdn-cache-control?: string;
        connection?: string | string[];
        content-disposition?: string;
        content-encoding?: string;
        content-language?: string;
        content-length?: string | number;
        content-location?: string;
        content-range?: string;
        content-security-policy?: string;
        content-security-policy-report-only?: string;
        cookie?: string | string[];
        date?: string;
        dav?: string | string[];
        dnt?: string;
        etag?: string;
        expect?: string;
        expires?: string;
        forwarded?: string;
        from?: string;
        host?: string;
        if-match?: string;
        if-modified-since?: string;
        if-none-match?: string;
        if-range?: string;
        if-unmodified-since?: string;
        last-modified?: string;
        link?: string | string[];
        location?: string;
        max-forwards?: string;
        origin?: string;
        prgama?: string | string[];
        proxy-authenticate?: string | string[];
        proxy-authorization?: string;
        public-key-pins?: string;
        public-key-pins-report-only?: string;
        range?: string;
        referer?: string;
        referrer-policy?: string;
        refresh?: string;
        retry-after?: string;
        sec-websocket-accept?: string;
        sec-websocket-extensions?: string | string[];
        sec-websocket-key?: string;
        sec-websocket-protocol?: string | string[];
        sec-websocket-version?: string;
        server?: string;
        set-cookie?: string | string[];
        strict-transport-security?: string;
        te?: string;
        trailer?: string;
        transfer-encoding?: string;
        upgrade?: string;
        upgrade-insecure-requests?: string;
        user-agent?: string;
        vary?: string;
        via?: string | string[];
        warning?: string;
        www-authenticate?: string | string[];
        x-content-type-options?: string;
        x-dns-prefetch-control?: string;
        x-frame-options?: string;
        x-xss-protection?: string;
    }

    Hierarchy

    • OutgoingHttpHeaders
      • Headers

    Properties

    accept? accept-charset? accept-encoding? accept-language? diff --git a/docs/interfaces/Request.html b/docs/interfaces/Request.html index fa44cbf..1af282b 100644 --- a/docs/interfaces/Request.html +++ b/docs/interfaces/Request.html @@ -1,8 +1,4 @@ -<<<<<<< HEAD -Request | @mr-mkz/axon

    Interface Request

    interface Request {
        aborted: boolean;
        body?: any;
        closed: boolean;
        complete: boolean;
        connection: Socket;
        destroyed: boolean;
        errored: null | Error;
        headers: IncomingHttpHeaders;
        headersDistinct: Dict<string[]>;
        httpVersion: string;
        httpVersionMajor: number;
        httpVersionMinor: number;
        method?: string;
        params: any;
        rawHeaders: string[];
        rawTrailers: string[];
        readable: boolean;
        readableAborted: boolean;
        readableDidRead: boolean;
        readableEncoding: null | BufferEncoding;
        readableEnded: boolean;
        readableFlowing: null | boolean;
        readableHighWaterMark: number;
        readableLength: number;
        readableObjectMode: boolean;
        socket: Socket;
        statusCode?: number;
        statusMessage?: string;
        trailers: Dict<string>;
        trailersDistinct: Dict<string[]>;
        url?: string;
        _construct?(callback: ((error?: null | Error) => void)): void;
        _destroy(error: null | Error, callback: ((error?: null | Error) => void)): void;
        _read(size: number): void;
        [asyncDispose](): Promise<void>;
        [asyncIterator](): AsyncIterableIterator<any, any, any>;
        [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
        addListener(event: "close", listener: (() => void)): this;
        addListener(event: "data", listener: ((chunk: any) => void)): this;
        addListener(event: "end", listener: (() => void)): this;
        addListener(event: "error", listener: ((err: Error) => void)): this;
        addListener(event: "pause", listener: (() => void)): this;
        addListener(event: "readable", listener: (() => void)): this;
        addListener(event: "resume", listener: (() => void)): this;
        addListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        asIndexedPairs(options?: Pick<ArrayOptions, "signal">): Readable;
        compose<T>(stream:
            | ComposeFnParam
            | T
            | Iterable<T, any, any>
            | AsyncIterable<T, any, any>, options?: {
            signal: AbortSignal;
        }): T;
        destroy(error?: Error): this;
        drop(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
        emit(event: "close"): boolean;
        emit(event: "data", chunk: any): boolean;
        emit(event: "end"): boolean;
        emit(event: "error", err: Error): boolean;
        emit(event: "pause"): boolean;
        emit(event: "readable"): boolean;
        emit(event: "resume"): boolean;
        emit(event: string | symbol, ...args: any[]): boolean;
        eventNames(): (string | symbol)[];
        every(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>), options?: ArrayOptions): Promise<boolean>;
        filter(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>), options?: ArrayOptions): Readable;
        find<T>(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => data is T), options?: ArrayOptions): Promise<undefined | T>;
        find(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>), options?: ArrayOptions): Promise<any>;
        flatMap(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => any), options?: ArrayOptions): Readable;
        forEach(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => void | Promise<void>), options?: ArrayOptions): Promise<void>;
        getMaxListeners(): number;
        isPaused(): boolean;
        iterator(options?: {
            destroyOnReturn?: boolean;
        }): AsyncIterableIterator<any, any, any>;
        listenerCount<K>(eventName: string | symbol, listener?: Function): number;
        listeners<K>(eventName: string | symbol): Function[];
        map(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => any), options?: ArrayOptions): Readable;
        off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
        on(event: "close", listener: (() => void)): this;
        on(event: "data", listener: ((chunk: any) => void)): this;
        on(event: "end", listener: (() => void)): this;
        on(event: "error", listener: ((err: Error) => void)): this;
        on(event: "pause", listener: (() => void)): this;
        on(event: "readable", listener: (() => void)): this;
        on(event: "resume", listener: (() => void)): this;
        on(event: string | symbol, listener: ((...args: any[]) => void)): this;
        once(event: "close", listener: (() => void)): this;
        once(event: "data", listener: ((chunk: any) => void)): this;
        once(event: "end", listener: (() => void)): this;
        once(event: "error", listener: ((err: Error) => void)): this;
        once(event: "pause", listener: (() => void)): this;
        once(event: "readable", listener: (() => void)): this;
        once(event: "resume", listener: (() => void)): this;
        once(event: string | symbol, listener: ((...args: any[]) => void)): this;
        pause(): this;
        pipe<T>(destination: T, options?: {
            end?: boolean;
        }): T;
        prependListener(event: "close", listener: (() => void)): this;
        prependListener(event: "data", listener: ((chunk: any) => void)): this;
        prependListener(event: "end", listener: (() => void)): this;
        prependListener(event: "error", listener: ((err: Error) => void)): this;
        prependListener(event: "pause", listener: (() => void)): this;
        prependListener(event: "readable", listener: (() => void)): this;
        prependListener(event: "resume", listener: (() => void)): this;
        prependListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        prependOnceListener(event: "close", listener: (() => void)): this;
        prependOnceListener(event: "data", listener: ((chunk: any) => void)): this;
        prependOnceListener(event: "end", listener: (() => void)): this;
        prependOnceListener(event: "error", listener: ((err: Error) => void)): this;
        prependOnceListener(event: "pause", listener: (() => void)): this;
        prependOnceListener(event: "readable", listener: (() => void)): this;
        prependOnceListener(event: "resume", listener: (() => void)): this;
        prependOnceListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        push(chunk: any, encoding?: BufferEncoding): boolean;
        rawListeners<K>(eventName: string | symbol): Function[];
        read(size?: number): any;
        reduce<T>(fn: ((previous: any, data: any, options?: Pick<ArrayOptions, "signal">) => T), initial?: undefined, options?: Pick<ArrayOptions, "signal">): Promise<T>;
        reduce<T>(fn: ((previous: T, data: any, options?: Pick<ArrayOptions, "signal">) => T), initial: T, options?: Pick<ArrayOptions, "signal">): Promise<T>;
        removeAllListeners(eventName?: string | symbol): this;
        removeListener(event: "close", listener: (() => void)): this;
        removeListener(event: "data", listener: ((chunk: any) => void)): this;
        removeListener(event: "end", listener: (() => void)): this;
        removeListener(event: "error", listener: ((err: Error) => void)): this;
        removeListener(event: "pause", listener: (() => void)): this;
        removeListener(event: "readable", listener: (() => void)): this;
        removeListener(event: "resume", listener: (() => void)): this;
        removeListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        resume(): this;
        setEncoding(encoding: BufferEncoding): this;
        setMaxListeners(n: number): this;
        setTimeout(msecs: number, callback?: (() => void)): this;
        some(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>), options?: ArrayOptions): Promise<boolean>;
        take(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
        toArray(options?: Pick<ArrayOptions, "signal">): Promise<any[]>;
        unpipe(destination?: WritableStream): this;
        unshift(chunk: any, encoding?: BufferEncoding): void;
        wrap(stream: ReadableStream): this;
    }

    Hierarchy

    • IncomingMessage
      • Request

    Properties

    aborted -======= -Request | @mr-mkz/axon

    Interface Request

    interface Request {
        aborted: boolean;
        body?: any;
        closed: boolean;
        complete: boolean;
        connection: Socket;
        destroyed: boolean;
        errored: null | Error;
        headers: IncomingHttpHeaders;
        headersDistinct: Dict<string[]>;
        httpVersion: string;
        httpVersionMajor: number;
        httpVersionMinor: number;
        method?: string;
        params: any;
        rawHeaders: string[];
        rawTrailers: string[];
        readable: boolean;
        readableAborted: boolean;
        readableDidRead: boolean;
        readableEncoding: null | BufferEncoding;
        readableEnded: boolean;
        readableFlowing: null | boolean;
        readableHighWaterMark: number;
        readableLength: number;
        readableObjectMode: boolean;
        socket: Socket;
        statusCode?: number;
        statusMessage?: string;
        trailers: Dict<string>;
        trailersDistinct: Dict<string[]>;
        url?: string;
        _construct?(callback: ((error?: null | Error) => void)): void;
        _destroy(error: null | Error, callback: ((error?: null | Error) => void)): void;
        _read(size: number): void;
        [asyncDispose](): Promise<void>;
        [asyncIterator](): AsyncIterableIterator<any, any, any>;
        [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
        addListener(event: "close", listener: (() => void)): this;
        addListener(event: "data", listener: ((chunk: any) => void)): this;
        addListener(event: "end", listener: (() => void)): this;
        addListener(event: "error", listener: ((err: Error) => void)): this;
        addListener(event: "pause", listener: (() => void)): this;
        addListener(event: "readable", listener: (() => void)): this;
        addListener(event: "resume", listener: (() => void)): this;
        addListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        asIndexedPairs(options?: Pick<ArrayOptions, "signal">): Readable;
        compose<T>(stream:
            | ComposeFnParam
            | T
            | Iterable<T, any, any>
            | AsyncIterable<T, any, any>, options?: {
            signal: AbortSignal;
        }): T;
        destroy(error?: Error): this;
        drop(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
        emit(event: "close"): boolean;
        emit(event: "data", chunk: any): boolean;
        emit(event: "end"): boolean;
        emit(event: "error", err: Error): boolean;
        emit(event: "pause"): boolean;
        emit(event: "readable"): boolean;
        emit(event: "resume"): boolean;
        emit(event: string | symbol, ...args: any[]): boolean;
        eventNames(): (string | symbol)[];
        every(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>), options?: ArrayOptions): Promise<boolean>;
        filter(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>), options?: ArrayOptions): Readable;
        find<T>(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => data is T), options?: ArrayOptions): Promise<undefined | T>;
        find(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>), options?: ArrayOptions): Promise<any>;
        flatMap(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => any), options?: ArrayOptions): Readable;
        forEach(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => void | Promise<void>), options?: ArrayOptions): Promise<void>;
        getMaxListeners(): number;
        isPaused(): boolean;
        iterator(options?: {
            destroyOnReturn?: boolean;
        }): AsyncIterableIterator<any, any, any>;
        listenerCount<K>(eventName: string | symbol, listener?: Function): number;
        listeners<K>(eventName: string | symbol): Function[];
        map(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => any), options?: ArrayOptions): Readable;
        off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
        on(event: "close", listener: (() => void)): this;
        on(event: "data", listener: ((chunk: any) => void)): this;
        on(event: "end", listener: (() => void)): this;
        on(event: "error", listener: ((err: Error) => void)): this;
        on(event: "pause", listener: (() => void)): this;
        on(event: "readable", listener: (() => void)): this;
        on(event: "resume", listener: (() => void)): this;
        on(event: string | symbol, listener: ((...args: any[]) => void)): this;
        once(event: "close", listener: (() => void)): this;
        once(event: "data", listener: ((chunk: any) => void)): this;
        once(event: "end", listener: (() => void)): this;
        once(event: "error", listener: ((err: Error) => void)): this;
        once(event: "pause", listener: (() => void)): this;
        once(event: "readable", listener: (() => void)): this;
        once(event: "resume", listener: (() => void)): this;
        once(event: string | symbol, listener: ((...args: any[]) => void)): this;
        pause(): this;
        pipe<T>(destination: T, options?: {
            end?: boolean;
        }): T;
        prependListener(event: "close", listener: (() => void)): this;
        prependListener(event: "data", listener: ((chunk: any) => void)): this;
        prependListener(event: "end", listener: (() => void)): this;
        prependListener(event: "error", listener: ((err: Error) => void)): this;
        prependListener(event: "pause", listener: (() => void)): this;
        prependListener(event: "readable", listener: (() => void)): this;
        prependListener(event: "resume", listener: (() => void)): this;
        prependListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        prependOnceListener(event: "close", listener: (() => void)): this;
        prependOnceListener(event: "data", listener: ((chunk: any) => void)): this;
        prependOnceListener(event: "end", listener: (() => void)): this;
        prependOnceListener(event: "error", listener: ((err: Error) => void)): this;
        prependOnceListener(event: "pause", listener: (() => void)): this;
        prependOnceListener(event: "readable", listener: (() => void)): this;
        prependOnceListener(event: "resume", listener: (() => void)): this;
        prependOnceListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        push(chunk: any, encoding?: BufferEncoding): boolean;
        rawListeners<K>(eventName: string | symbol): Function[];
        read(size?: number): any;
        reduce<T>(fn: ((previous: any, data: any, options?: Pick<ArrayOptions, "signal">) => T), initial?: undefined, options?: Pick<ArrayOptions, "signal">): Promise<T>;
        reduce<T>(fn: ((previous: T, data: any, options?: Pick<ArrayOptions, "signal">) => T), initial: T, options?: Pick<ArrayOptions, "signal">): Promise<T>;
        removeAllListeners(eventName?: string | symbol): this;
        removeListener(event: "close", listener: (() => void)): this;
        removeListener(event: "data", listener: ((chunk: any) => void)): this;
        removeListener(event: "end", listener: (() => void)): this;
        removeListener(event: "error", listener: ((err: Error) => void)): this;
        removeListener(event: "pause", listener: (() => void)): this;
        removeListener(event: "readable", listener: (() => void)): this;
        removeListener(event: "resume", listener: (() => void)): this;
        removeListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        resume(): this;
        setEncoding(encoding: BufferEncoding): this;
        setMaxListeners(n: number): this;
        setTimeout(msecs: number, callback?: (() => void)): this;
        some(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>), options?: ArrayOptions): Promise<boolean>;
        take(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
        toArray(options?: Pick<ArrayOptions, "signal">): Promise<any[]>;
        unpipe(destination?: WritableStream): this;
        unshift(chunk: any, encoding?: BufferEncoding): void;
        wrap(stream: ReadableStream): this;
    }

    Hierarchy

    • IncomingMessage
      • Request

    Properties

    aborted ->>>>>>> dcff1c2d383ff73442e501794ffbc565204741a4 +Request | @mr-mkz/axon

    Interface Request

    interface Request {
        aborted: boolean;
        body?: any;
        closed: boolean;
        complete: boolean;
        connection: Socket;
        destroyed: boolean;
        errored: null | Error;
        headers: IncomingHttpHeaders;
        headersDistinct: Dict<string[]>;
        httpVersion: string;
        httpVersionMajor: number;
        httpVersionMinor: number;
        method?: string;
        params: any;
        rawHeaders: string[];
        rawTrailers: string[];
        readable: boolean;
        readableAborted: boolean;
        readableDidRead: boolean;
        readableEncoding: null | BufferEncoding;
        readableEnded: boolean;
        readableFlowing: null | boolean;
        readableHighWaterMark: number;
        readableLength: number;
        readableObjectMode: boolean;
        socket: Socket;
        statusCode?: number;
        statusMessage?: string;
        trailers: Dict<string>;
        trailersDistinct: Dict<string[]>;
        url?: string;
        _construct?(callback: ((error?: null | Error) => void)): void;
        _destroy(error: null | Error, callback: ((error?: null | Error) => void)): void;
        _read(size: number): void;
        [asyncDispose](): Promise<void>;
        [asyncIterator](): AsyncIterableIterator<any, any, any>;
        [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
        addListener(event: "close", listener: (() => void)): this;
        addListener(event: "data", listener: ((chunk: any) => void)): this;
        addListener(event: "end", listener: (() => void)): this;
        addListener(event: "error", listener: ((err: Error) => void)): this;
        addListener(event: "pause", listener: (() => void)): this;
        addListener(event: "readable", listener: (() => void)): this;
        addListener(event: "resume", listener: (() => void)): this;
        addListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        asIndexedPairs(options?: Pick<ArrayOptions, "signal">): Readable;
        compose<T>(stream:
            | ComposeFnParam
            | T
            | Iterable<T, any, any>
            | AsyncIterable<T, any, any>, options?: {
            signal: AbortSignal;
        }): T;
        destroy(error?: Error): this;
        drop(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
        emit(event: "close"): boolean;
        emit(event: "data", chunk: any): boolean;
        emit(event: "end"): boolean;
        emit(event: "error", err: Error): boolean;
        emit(event: "pause"): boolean;
        emit(event: "readable"): boolean;
        emit(event: "resume"): boolean;
        emit(event: string | symbol, ...args: any[]): boolean;
        eventNames(): (string | symbol)[];
        every(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>), options?: ArrayOptions): Promise<boolean>;
        filter(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>), options?: ArrayOptions): Readable;
        find<T>(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => data is T), options?: ArrayOptions): Promise<undefined | T>;
        find(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>), options?: ArrayOptions): Promise<any>;
        flatMap(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => any), options?: ArrayOptions): Readable;
        forEach(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => void | Promise<void>), options?: ArrayOptions): Promise<void>;
        getMaxListeners(): number;
        isPaused(): boolean;
        iterator(options?: {
            destroyOnReturn?: boolean;
        }): AsyncIterableIterator<any, any, any>;
        listenerCount<K>(eventName: string | symbol, listener?: Function): number;
        listeners<K>(eventName: string | symbol): Function[];
        map(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => any), options?: ArrayOptions): Readable;
        off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
        on(event: "close", listener: (() => void)): this;
        on(event: "data", listener: ((chunk: any) => void)): this;
        on(event: "end", listener: (() => void)): this;
        on(event: "error", listener: ((err: Error) => void)): this;
        on(event: "pause", listener: (() => void)): this;
        on(event: "readable", listener: (() => void)): this;
        on(event: "resume", listener: (() => void)): this;
        on(event: string | symbol, listener: ((...args: any[]) => void)): this;
        once(event: "close", listener: (() => void)): this;
        once(event: "data", listener: ((chunk: any) => void)): this;
        once(event: "end", listener: (() => void)): this;
        once(event: "error", listener: ((err: Error) => void)): this;
        once(event: "pause", listener: (() => void)): this;
        once(event: "readable", listener: (() => void)): this;
        once(event: "resume", listener: (() => void)): this;
        once(event: string | symbol, listener: ((...args: any[]) => void)): this;
        pause(): this;
        pipe<T>(destination: T, options?: {
            end?: boolean;
        }): T;
        prependListener(event: "close", listener: (() => void)): this;
        prependListener(event: "data", listener: ((chunk: any) => void)): this;
        prependListener(event: "end", listener: (() => void)): this;
        prependListener(event: "error", listener: ((err: Error) => void)): this;
        prependListener(event: "pause", listener: (() => void)): this;
        prependListener(event: "readable", listener: (() => void)): this;
        prependListener(event: "resume", listener: (() => void)): this;
        prependListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        prependOnceListener(event: "close", listener: (() => void)): this;
        prependOnceListener(event: "data", listener: ((chunk: any) => void)): this;
        prependOnceListener(event: "end", listener: (() => void)): this;
        prependOnceListener(event: "error", listener: ((err: Error) => void)): this;
        prependOnceListener(event: "pause", listener: (() => void)): this;
        prependOnceListener(event: "readable", listener: (() => void)): this;
        prependOnceListener(event: "resume", listener: (() => void)): this;
        prependOnceListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        push(chunk: any, encoding?: BufferEncoding): boolean;
        rawListeners<K>(eventName: string | symbol): Function[];
        read(size?: number): any;
        reduce<T>(fn: ((previous: any, data: any, options?: Pick<ArrayOptions, "signal">) => T), initial?: undefined, options?: Pick<ArrayOptions, "signal">): Promise<T>;
        reduce<T>(fn: ((previous: T, data: any, options?: Pick<ArrayOptions, "signal">) => T), initial: T, options?: Pick<ArrayOptions, "signal">): Promise<T>;
        removeAllListeners(eventName?: string | symbol): this;
        removeListener(event: "close", listener: (() => void)): this;
        removeListener(event: "data", listener: ((chunk: any) => void)): this;
        removeListener(event: "end", listener: (() => void)): this;
        removeListener(event: "error", listener: ((err: Error) => void)): this;
        removeListener(event: "pause", listener: (() => void)): this;
        removeListener(event: "readable", listener: (() => void)): this;
        removeListener(event: "resume", listener: (() => void)): this;
        removeListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        resume(): this;
        setEncoding(encoding: BufferEncoding): this;
        setMaxListeners(n: number): this;
        setTimeout(msecs: number, callback?: (() => void)): this;
        some(fn: ((data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>), options?: ArrayOptions): Promise<boolean>;
        take(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
        toArray(options?: Pick<ArrayOptions, "signal">): Promise<any[]>;
        unpipe(destination?: WritableStream): this;
        unshift(chunk: any, encoding?: BufferEncoding): void;
        wrap(stream: ReadableStream): this;
    }

    Hierarchy

    • IncomingMessage
      • Request

    Properties

    aborted body? closed complete @@ -85,11 +81,7 @@

    v10.1.0

    Since v17.0.0,v16.12.0 - Check message.destroyed from stream.Readable.

    body?: any

    the body of request which sent from client

    -<<<<<<< HEAD -
    closed: boolean

    Is true after 'close' has been emitted.

    -======= -
    closed: boolean

    Is true after 'close' has been emitted.

    ->>>>>>> dcff1c2d383ff73442e501794ffbc565204741a4 +
    closed: boolean

    Is true after 'close' has been emitted.

    v18.0.0

    complete: boolean

    The message.complete property will be true if a complete HTTP message has been received and successfully parsed.

    @@ -145,11 +137,7 @@
    rawHeaders: string[]

    The raw request/response headers list exactly as they were received.

    -======= -
    rawHeaders: string[]

    The raw request/response headers list exactly as they were received.

    ->>>>>>> dcff1c2d383ff73442e501794ffbc565204741a4 +
    rawHeaders: string[]

    The raw request/response headers list exactly as they were received.

    The keys and values are in the same list. It is not a list of tuples. So, the even-numbered offsets are key values, and the odd-numbered offsets are the associated values.

    diff --git a/docs/interfaces/Response.html b/docs/interfaces/Response.html index 15dbefe..4a11068 100644 --- a/docs/interfaces/Response.html +++ b/docs/interfaces/Response.html @@ -1,8 +1,4 @@ -<<<<<<< HEAD -Response | @mr-mkz/axon

    Interface Response

    interface Response {
        chunkedEncoding: boolean;
        closed: boolean;
        connection: null | Socket;
        destroyed: boolean;
        errored: null | Error;
        finished: boolean;
        headersSent: boolean;
        req: IncomingMessage;
        sendDate: boolean;
        shouldKeepAlive: boolean;
        socket: null | Socket;
        status: ((code: number) => AxonResponse);
        statusCode: number;
        statusMessage: string;
        strictContentLength: boolean;
        useChunkedEncodingByDefault: boolean;
        writable: boolean;
        writableCorked: number;
        writableEnded: boolean;
        writableFinished: boolean;
        writableHighWaterMark: number;
        writableLength: number;
        writableNeedDrain: boolean;
        writableObjectMode: boolean;
        _construct?(callback: ((error?: null | Error) => void)): void;
        _destroy(error: null | Error, callback: ((error?: null | Error) => void)): void;
        _final(callback: ((error?: null | Error) => void)): void;
        _write(chunk: any, encoding: BufferEncoding, callback: ((error?: null | Error) => void)): void;
        _writev?(chunks: {
            chunk: any;
            encoding: BufferEncoding;
        }[], callback: ((error?: null | Error) => void)): void;
        [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
        addListener(event: "close", listener: (() => void)): this;
        addListener(event: "drain", listener: (() => void)): this;
        addListener(event: "error", listener: ((err: Error) => void)): this;
        addListener(event: "finish", listener: (() => void)): this;
        addListener(event: "pipe", listener: ((src: Readable) => void)): this;
        addListener(event: "unpipe", listener: ((src: Readable) => void)): this;
        addListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        addTrailers(headers: OutgoingHttpHeaders | readonly [string, string][]): void;
        appendHeader(name: string, value: string | readonly string[]): this;
        assignSocket(socket: Socket): void;
        compose<T>(stream:
            | ComposeFnParam
            | T
            | Iterable<T, any, any>
            | AsyncIterable<T, any, any>, options?: {
            signal: AbortSignal;
        }): T;
        cork(): void;
        destroy(error?: Error): this;
        detachSocket(socket: Socket): void;
        emit(event: "close"): boolean;
        emit(event: "drain"): boolean;
        emit(event: "error", err: Error): boolean;
        emit(event: "finish"): boolean;
        emit(event: "pipe", src: Readable): boolean;
        emit(event: "unpipe", src: Readable): boolean;
        emit(event: string | symbol, ...args: any[]): boolean;
        end(cb?: (() => void)): this;
        end(chunk: any, cb?: (() => void)): this;
        end(chunk: any, encoding: BufferEncoding, cb?: (() => void)): this;
        eventNames(): (string | symbol)[];
        flushHeaders(): void;
        getHeader(name: string):
            | undefined
            | string
            | number
            | string[];
        getHeaderNames(): string[];
        getHeaders(): OutgoingHttpHeaders;
        getMaxListeners(): number;
        hasHeader(name: string): boolean;
        listenerCount<K>(eventName: string | symbol, listener?: Function): number;
        listeners<K>(eventName: string | symbol): Function[];
        off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
        on(event: "close", listener: (() => void)): this;
        on(event: "drain", listener: (() => void)): this;
        on(event: "error", listener: ((err: Error) => void)): this;
        on(event: "finish", listener: (() => void)): this;
        on(event: "pipe", listener: ((src: Readable) => void)): this;
        on(event: "unpipe", listener: ((src: Readable) => void)): this;
        on(event: string | symbol, listener: ((...args: any[]) => void)): this;
        once(event: "close", listener: (() => void)): this;
        once(event: "drain", listener: (() => void)): this;
        once(event: "error", listener: ((err: Error) => void)): this;
        once(event: "finish", listener: (() => void)): this;
        once(event: "pipe", listener: ((src: Readable) => void)): this;
        once(event: "unpipe", listener: ((src: Readable) => void)): this;
        once(event: string | symbol, listener: ((...args: any[]) => void)): this;
        pipe<T>(destination: T, options?: {
            end?: boolean;
        }): T;
        prependListener(event: "close", listener: (() => void)): this;
        prependListener(event: "drain", listener: (() => void)): this;
        prependListener(event: "error", listener: ((err: Error) => void)): this;
        prependListener(event: "finish", listener: (() => void)): this;
        prependListener(event: "pipe", listener: ((src: Readable) => void)): this;
        prependListener(event: "unpipe", listener: ((src: Readable) => void)): this;
        prependListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        prependOnceListener(event: "close", listener: (() => void)): this;
        prependOnceListener(event: "drain", listener: (() => void)): this;
        prependOnceListener(event: "error", listener: ((err: Error) => void)): this;
        prependOnceListener(event: "finish", listener: (() => void)): this;
        prependOnceListener(event: "pipe", listener: ((src: Readable) => void)): this;
        prependOnceListener(event: "unpipe", listener: ((src: Readable) => void)): this;
        prependOnceListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        rawListeners<K>(eventName: string | symbol): Function[];
        removeAllListeners(eventName?: string | symbol): this;
        removeHeader(name: string): void;
        removeListener(event: "close", listener: (() => void)): this;
        removeListener(event: "drain", listener: (() => void)): this;
        removeListener(event: "error", listener: ((err: Error) => void)): this;
        removeListener(event: "finish", listener: (() => void)): this;
        removeListener(event: "pipe", listener: ((src: Readable) => void)): this;
        removeListener(event: "unpipe", listener: ((src: Readable) => void)): this;
        removeListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        setDefaultEncoding(encoding: BufferEncoding): this;
        setHeader(name: string, value: string | number | readonly string[]): this;
        setMaxListeners(n: number): this;
        setTimeout(msecs: number, callback?: (() => void)): this;
        uncork(): void;
        write(chunk: any, callback?: ((error: undefined | null | Error) => void)): boolean;
        write(chunk: any, encoding: BufferEncoding, callback?: ((error: undefined | null | Error) => void)): boolean;
        writeContinue(callback?: (() => void)): void;
        writeEarlyHints(hints: Record<string, string | string[]>, callback?: (() => void)): void;
        writeHead(statusCode: number, statusMessage?: string, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
        writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
        writeProcessing(): void;
    }

    Hierarchy

    • ServerResponse
      • Response

    Properties

    chunkedEncoding -======= -Response | @mr-mkz/axon

    Interface Response

    interface Response {
        chunkedEncoding: boolean;
        closed: boolean;
        connection: null | Socket;
        destroyed: boolean;
        errored: null | Error;
        finished: boolean;
        headersSent: boolean;
        req: IncomingMessage;
        sendDate: boolean;
        shouldKeepAlive: boolean;
        socket: null | Socket;
        status: ((code: number) => AxonResponse);
        statusCode: number;
        statusMessage: string;
        strictContentLength: boolean;
        useChunkedEncodingByDefault: boolean;
        writable: boolean;
        writableCorked: number;
        writableEnded: boolean;
        writableFinished: boolean;
        writableHighWaterMark: number;
        writableLength: number;
        writableNeedDrain: boolean;
        writableObjectMode: boolean;
        _construct?(callback: ((error?: null | Error) => void)): void;
        _destroy(error: null | Error, callback: ((error?: null | Error) => void)): void;
        _final(callback: ((error?: null | Error) => void)): void;
        _write(chunk: any, encoding: BufferEncoding, callback: ((error?: null | Error) => void)): void;
        _writev?(chunks: {
            chunk: any;
            encoding: BufferEncoding;
        }[], callback: ((error?: null | Error) => void)): void;
        [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
        addListener(event: "close", listener: (() => void)): this;
        addListener(event: "drain", listener: (() => void)): this;
        addListener(event: "error", listener: ((err: Error) => void)): this;
        addListener(event: "finish", listener: (() => void)): this;
        addListener(event: "pipe", listener: ((src: Readable) => void)): this;
        addListener(event: "unpipe", listener: ((src: Readable) => void)): this;
        addListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        addTrailers(headers: OutgoingHttpHeaders | readonly [string, string][]): void;
        appendHeader(name: string, value: string | readonly string[]): this;
        assignSocket(socket: Socket): void;
        compose<T>(stream:
            | ComposeFnParam
            | T
            | Iterable<T, any, any>
            | AsyncIterable<T, any, any>, options?: {
            signal: AbortSignal;
        }): T;
        cork(): void;
        destroy(error?: Error): this;
        detachSocket(socket: Socket): void;
        emit(event: "close"): boolean;
        emit(event: "drain"): boolean;
        emit(event: "error", err: Error): boolean;
        emit(event: "finish"): boolean;
        emit(event: "pipe", src: Readable): boolean;
        emit(event: "unpipe", src: Readable): boolean;
        emit(event: string | symbol, ...args: any[]): boolean;
        end(cb?: (() => void)): this;
        end(chunk: any, cb?: (() => void)): this;
        end(chunk: any, encoding: BufferEncoding, cb?: (() => void)): this;
        eventNames(): (string | symbol)[];
        flushHeaders(): void;
        getHeader(name: string):
            | undefined
            | string
            | number
            | string[];
        getHeaderNames(): string[];
        getHeaders(): OutgoingHttpHeaders;
        getMaxListeners(): number;
        hasHeader(name: string): boolean;
        listenerCount<K>(eventName: string | symbol, listener?: Function): number;
        listeners<K>(eventName: string | symbol): Function[];
        off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
        on(event: "close", listener: (() => void)): this;
        on(event: "drain", listener: (() => void)): this;
        on(event: "error", listener: ((err: Error) => void)): this;
        on(event: "finish", listener: (() => void)): this;
        on(event: "pipe", listener: ((src: Readable) => void)): this;
        on(event: "unpipe", listener: ((src: Readable) => void)): this;
        on(event: string | symbol, listener: ((...args: any[]) => void)): this;
        once(event: "close", listener: (() => void)): this;
        once(event: "drain", listener: (() => void)): this;
        once(event: "error", listener: ((err: Error) => void)): this;
        once(event: "finish", listener: (() => void)): this;
        once(event: "pipe", listener: ((src: Readable) => void)): this;
        once(event: "unpipe", listener: ((src: Readable) => void)): this;
        once(event: string | symbol, listener: ((...args: any[]) => void)): this;
        pipe<T>(destination: T, options?: {
            end?: boolean;
        }): T;
        prependListener(event: "close", listener: (() => void)): this;
        prependListener(event: "drain", listener: (() => void)): this;
        prependListener(event: "error", listener: ((err: Error) => void)): this;
        prependListener(event: "finish", listener: (() => void)): this;
        prependListener(event: "pipe", listener: ((src: Readable) => void)): this;
        prependListener(event: "unpipe", listener: ((src: Readable) => void)): this;
        prependListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        prependOnceListener(event: "close", listener: (() => void)): this;
        prependOnceListener(event: "drain", listener: (() => void)): this;
        prependOnceListener(event: "error", listener: ((err: Error) => void)): this;
        prependOnceListener(event: "finish", listener: (() => void)): this;
        prependOnceListener(event: "pipe", listener: ((src: Readable) => void)): this;
        prependOnceListener(event: "unpipe", listener: ((src: Readable) => void)): this;
        prependOnceListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        rawListeners<K>(eventName: string | symbol): Function[];
        removeAllListeners(eventName?: string | symbol): this;
        removeHeader(name: string): void;
        removeListener(event: "close", listener: (() => void)): this;
        removeListener(event: "drain", listener: (() => void)): this;
        removeListener(event: "error", listener: ((err: Error) => void)): this;
        removeListener(event: "finish", listener: (() => void)): this;
        removeListener(event: "pipe", listener: ((src: Readable) => void)): this;
        removeListener(event: "unpipe", listener: ((src: Readable) => void)): this;
        removeListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        setDefaultEncoding(encoding: BufferEncoding): this;
        setHeader(name: string, value: string | number | readonly string[]): this;
        setMaxListeners(n: number): this;
        setTimeout(msecs: number, callback?: (() => void)): this;
        uncork(): void;
        write(chunk: any, callback?: ((error: undefined | null | Error) => void)): boolean;
        write(chunk: any, encoding: BufferEncoding, callback?: ((error: undefined | null | Error) => void)): boolean;
        writeContinue(callback?: (() => void)): void;
        writeEarlyHints(hints: Record<string, string | string[]>, callback?: (() => void)): void;
        writeHead(statusCode: number, statusMessage?: string, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
        writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
        writeProcessing(): void;
    }

    Hierarchy

    • ServerResponse
      • Response

    Properties

    chunkedEncoding ->>>>>>> dcff1c2d383ff73442e501794ffbc565204741a4 +Response | @mr-mkz/axon

    Interface Response

    interface Response {
        chunkedEncoding: boolean;
        closed: boolean;
        connection: null | Socket;
        destroyed: boolean;
        errored: null | Error;
        finished: boolean;
        headersSent: boolean;
        req: IncomingMessage;
        sendDate: boolean;
        shouldKeepAlive: boolean;
        socket: null | Socket;
        status: ((code: number) => AxonResponse);
        statusCode: number;
        statusMessage: string;
        strictContentLength: boolean;
        useChunkedEncodingByDefault: boolean;
        writable: boolean;
        writableCorked: number;
        writableEnded: boolean;
        writableFinished: boolean;
        writableHighWaterMark: number;
        writableLength: number;
        writableNeedDrain: boolean;
        writableObjectMode: boolean;
        _construct?(callback: ((error?: null | Error) => void)): void;
        _destroy(error: null | Error, callback: ((error?: null | Error) => void)): void;
        _final(callback: ((error?: null | Error) => void)): void;
        _write(chunk: any, encoding: BufferEncoding, callback: ((error?: null | Error) => void)): void;
        _writev?(chunks: {
            chunk: any;
            encoding: BufferEncoding;
        }[], callback: ((error?: null | Error) => void)): void;
        [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
        addListener(event: "close", listener: (() => void)): this;
        addListener(event: "drain", listener: (() => void)): this;
        addListener(event: "error", listener: ((err: Error) => void)): this;
        addListener(event: "finish", listener: (() => void)): this;
        addListener(event: "pipe", listener: ((src: Readable) => void)): this;
        addListener(event: "unpipe", listener: ((src: Readable) => void)): this;
        addListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        addTrailers(headers: OutgoingHttpHeaders | readonly [string, string][]): void;
        appendHeader(name: string, value: string | readonly string[]): this;
        assignSocket(socket: Socket): void;
        compose<T>(stream:
            | ComposeFnParam
            | T
            | Iterable<T, any, any>
            | AsyncIterable<T, any, any>, options?: {
            signal: AbortSignal;
        }): T;
        cork(): void;
        destroy(error?: Error): this;
        detachSocket(socket: Socket): void;
        emit(event: "close"): boolean;
        emit(event: "drain"): boolean;
        emit(event: "error", err: Error): boolean;
        emit(event: "finish"): boolean;
        emit(event: "pipe", src: Readable): boolean;
        emit(event: "unpipe", src: Readable): boolean;
        emit(event: string | symbol, ...args: any[]): boolean;
        end(cb?: (() => void)): this;
        end(chunk: any, cb?: (() => void)): this;
        end(chunk: any, encoding: BufferEncoding, cb?: (() => void)): this;
        eventNames(): (string | symbol)[];
        flushHeaders(): void;
        getHeader(name: string):
            | undefined
            | string
            | number
            | string[];
        getHeaderNames(): string[];
        getHeaders(): OutgoingHttpHeaders;
        getMaxListeners(): number;
        hasHeader(name: string): boolean;
        listenerCount<K>(eventName: string | symbol, listener?: Function): number;
        listeners<K>(eventName: string | symbol): Function[];
        off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
        on(event: "close", listener: (() => void)): this;
        on(event: "drain", listener: (() => void)): this;
        on(event: "error", listener: ((err: Error) => void)): this;
        on(event: "finish", listener: (() => void)): this;
        on(event: "pipe", listener: ((src: Readable) => void)): this;
        on(event: "unpipe", listener: ((src: Readable) => void)): this;
        on(event: string | symbol, listener: ((...args: any[]) => void)): this;
        once(event: "close", listener: (() => void)): this;
        once(event: "drain", listener: (() => void)): this;
        once(event: "error", listener: ((err: Error) => void)): this;
        once(event: "finish", listener: (() => void)): this;
        once(event: "pipe", listener: ((src: Readable) => void)): this;
        once(event: "unpipe", listener: ((src: Readable) => void)): this;
        once(event: string | symbol, listener: ((...args: any[]) => void)): this;
        pipe<T>(destination: T, options?: {
            end?: boolean;
        }): T;
        prependListener(event: "close", listener: (() => void)): this;
        prependListener(event: "drain", listener: (() => void)): this;
        prependListener(event: "error", listener: ((err: Error) => void)): this;
        prependListener(event: "finish", listener: (() => void)): this;
        prependListener(event: "pipe", listener: ((src: Readable) => void)): this;
        prependListener(event: "unpipe", listener: ((src: Readable) => void)): this;
        prependListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        prependOnceListener(event: "close", listener: (() => void)): this;
        prependOnceListener(event: "drain", listener: (() => void)): this;
        prependOnceListener(event: "error", listener: ((err: Error) => void)): this;
        prependOnceListener(event: "finish", listener: (() => void)): this;
        prependOnceListener(event: "pipe", listener: ((src: Readable) => void)): this;
        prependOnceListener(event: "unpipe", listener: ((src: Readable) => void)): this;
        prependOnceListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        rawListeners<K>(eventName: string | symbol): Function[];
        removeAllListeners(eventName?: string | symbol): this;
        removeHeader(name: string): void;
        removeListener(event: "close", listener: (() => void)): this;
        removeListener(event: "drain", listener: (() => void)): this;
        removeListener(event: "error", listener: ((err: Error) => void)): this;
        removeListener(event: "finish", listener: (() => void)): this;
        removeListener(event: "pipe", listener: ((src: Readable) => void)): this;
        removeListener(event: "unpipe", listener: ((src: Readable) => void)): this;
        removeListener(event: string | symbol, listener: ((...args: any[]) => void)): this;
        setDefaultEncoding(encoding: BufferEncoding): this;
        setHeader(name: string, value: string | number | readonly string[]): this;
        setMaxListeners(n: number): this;
        setTimeout(msecs: number, callback?: (() => void)): this;
        uncork(): void;
        write(chunk: any, callback?: ((error: undefined | null | Error) => void)): boolean;
        write(chunk: any, encoding: BufferEncoding, callback?: ((error: undefined | null | Error) => void)): boolean;
        writeContinue(callback?: (() => void)): void;
        writeEarlyHints(hints: Record<string, string | string[]>, callback?: (() => void)): void;
        writeHead(statusCode: number, statusMessage?: string, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
        writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
        writeProcessing(): void;
    }

    Hierarchy

    • ServerResponse
      • Response

    Properties

    chunkedEncoding closed connection destroyed @@ -89,11 +85,7 @@

    v0.3.0

    status: ((code: number) => AxonResponse)

    to add http response code for client.

    Type declaration

      • (code): AxonResponse
      • Parameters

        • code: number

          http response code

          -<<<<<<< HEAD -

        Returns AxonResponse

    statusCode: number

    When using implicit headers (not calling response.writeHead() explicitly), -======= -

    Returns AxonResponse

    statusCode: number

    When using implicit headers (not calling response.writeHead() explicitly), ->>>>>>> dcff1c2d383ff73442e501794ffbc565204741a4 +

    Returns AxonResponse

    statusCode: number

    When using implicit headers (not calling response.writeHead() explicitly), this property controls the status code that will be sent to the client when the headers get flushed.

    response.statusCode = 404;
    diff --git a/docs/media/index.js b/docs/media/index.js
    index 6652323..6a5877d 100644
    --- a/docs/media/index.js
    +++ b/docs/media/index.js
    @@ -16,6 +16,9 @@ core.loadConfig({
         LOGGER_VERBOSE: false,  // default false
         RESPONSE_MESSAGES: {    
             notFound: "route '{path}' not found"
    +    },
    +    CORS: {
    +        origin: 'https://github.com'
         }
     })
     
    diff --git a/docs/media/index.ts b/docs/media/index.ts
    index 1e5384c..8209659 100644
    --- a/docs/media/index.ts
    +++ b/docs/media/index.ts
    @@ -17,7 +17,7 @@ core.loadConfig({
             notFound: "route '{path}' not found"
         },
         CORS: {
    -        origin: ''
    +        origin: 'https://github.com'
         }
     })
     
    diff --git a/docs/types/AxonCorsConfig.html b/docs/types/AxonCorsConfig.html
    index 18df4ce..f8f2a92 100644
    --- a/docs/types/AxonCorsConfig.html
    +++ b/docs/types/AxonCorsConfig.html
    @@ -56,4 +56,4 @@
     
     
     
  • OptionalpreflightContinue?: boolean

    Pass the CORS preflight response to the next handler.

    -
  • +
    diff --git a/docs/types/Controller.html b/docs/types/Controller.html index 9af5227..87f1cd0 100644 --- a/docs/types/Controller.html +++ b/docs/types/Controller.html @@ -1,5 +1 @@ -<<<<<<< HEAD -Controller | @mr-mkz/axon

    Type Alias Controller

    Controller: ((req: Request, res: Response) => Promise<any>)
    -======= -Controller | @mr-mkz/axon

    Type Alias Controller

    Controller: ((req: Request, res: Response) => Promise<any>)
    ->>>>>>> dcff1c2d383ff73442e501794ffbc565204741a4 +Controller | @mr-mkz/axon

    Type Alias Controller

    Controller: ((req: Request, res: Response) => Promise<any>)
    diff --git a/docs/types/Middleware.html b/docs/types/Middleware.html index e7f5eb4..a80ab61 100644 --- a/docs/types/Middleware.html +++ b/docs/types/Middleware.html @@ -1,5 +1 @@ -<<<<<<< HEAD -Middleware | @mr-mkz/axon

    Type Alias Middleware

    Middleware: ((req: Request, res: Response, next: nextFn) => Promise<any>)
    -======= -Middleware | @mr-mkz/axon

    Type Alias Middleware

    Middleware: ((req: Request, res: Response, next: nextFn) => Promise<any>)
    ->>>>>>> dcff1c2d383ff73442e501794ffbc565204741a4 +Middleware | @mr-mkz/axon

    Type Alias Middleware

    Middleware: ((req: Request, res: Response, next: nextFn) => Promise<any>)
    diff --git a/docs/types/nextFn.html b/docs/types/nextFn.html index d67ab8d..4671f51 100644 --- a/docs/types/nextFn.html +++ b/docs/types/nextFn.html @@ -1,5 +1 @@ -<<<<<<< HEAD -nextFn | @mr-mkz/axon

    Type Alias nextFn

    nextFn: (() => Promise<any>)
    -======= -nextFn | @mr-mkz/axon

    Type Alias nextFn

    nextFn: (() => Promise<any>)
    ->>>>>>> dcff1c2d383ff73442e501794ffbc565204741a4 +nextFn | @mr-mkz/axon

    Type Alias nextFn

    nextFn: (() => Promise<any>)