trait Http extends Object
To use the HTTP server and client one must require('http').
The HTTP interfaces in Node.js are designed to support many features of the protocol which have been traditionally difficult to use. In particular, large, possibly chunk-encoded, messages. The interface is careful to never buffer entire requests or responses--the user is able to stream data.
- Annotations
- @JSType() @native()
- See also
https://nodejs.org/api/http.html
- Alphabetic
- By Inheritance
- Http
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val METHODS: Array[String]
A list of the HTTP methods that are supported by the parser.
- val STATUS_CODES: StatusCodes
A collection of all the standard HTTP response status codes, and the short description of each.
A collection of all the standard HTTP response status codes, and the short description of each.
http.STATUS_CODES[404] === 'Not Found'.
Example: - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def createServer(): Server
- def createServer(requestListener: Function2[ClientRequest, ServerResponse, Any]): Server
- def createServer(options: ServerOptions, requestListener: Function2[ClientRequest, ServerResponse, Any]): Server
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def get(options: RequestOptions, callback: Function): ClientRequest
- def get(options: RequestOptions): ClientRequest
- def get(url: URL): ClientRequest
- def get(url: URL, callback: Function1[ServerResponse, Any]): ClientRequest
- def get(url: URL, options: RequestOptions): ClientRequest
- def get(url: String): ClientRequest
- def get(url: String, callback: Function1[ServerResponse, Any]): ClientRequest
- def get(url: String, options: RequestOptions): ClientRequest
- def get(url: URL, options: RequestOptions, callback: Function1[ServerResponse, Any]): ClientRequest
- def get(url: String, options: RequestOptions, callback: Function1[ServerResponse, Any]): ClientRequest
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def globalAgent: Agent
Global instance of Agent which is used as the default for all http client requests.
Global instance of Agent which is used as the default for all http client requests.
http.globalAgent
Example: - def hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- def maxHeaderSize: Int
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- def request(options: RequestOptions, callback: Function1[ServerResponse, Any]): Unit
- def request(options: RequestOptions): Unit
- def request(url: URL): Unit
- def request(url: URL, callback: Function1[ServerResponse, Any]): Unit
- def request(url: URL, options: RequestOptions, callback: Function1[ServerResponse, Any]): Unit
- def request(url: URL, options: RequestOptions): Unit
- def request(url: String): Unit
- def request(url: String, callback: Function1[ServerResponse, Any]): Unit
- def request(url: String, options: RequestOptions, callback: Function1[ServerResponse, Any]): Unit
- def request(url: String, options: RequestOptions): Unit
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toLocaleString(): String
- Definition Classes
- Object
- def toString(): String
- Definition Classes
- AnyRef → Any
- def valueOf(): Any
- Definition Classes
- Object
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()