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
- @RawJSType() @native()
- See also
https://nodejs.org/api/http.html
- Alphabetic
- By Inheritance
- Http
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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( ... ) @native() @HotSpotIntrinsicCandidate()
- def createServer(requestListener: Function2[ClientRequest, ServerResponse, Any] = js.native): Server
- def createServer(options: ServerOptions, requestListener: Function2[ClientRequest, ServerResponse, Any]): Server
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def get(options: RequestOptions, callback: Function): ClientRequest
- def get(options: RequestOptions): ClientRequest
- def get(url: |[String, URL]): ClientRequest
- def get(url: |[String, URL], callback: Function1[ServerResponse, Any]): ClientRequest
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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: |[String, URL]): Unit
- def request(url: |[String, URL], callback: Function1[ServerResponse, Any]): 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(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )