How to check if an object is of type IncomingMessage (NodeJS)

Viewed 506
1 Answers

Import / require the http module:

const http = require('http')

//

if (context.req instanceof http.IncomingMessage) {
    //
}
Related