Packages

package http

http package object

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. http
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class Agent extends Object with IEventEmitter

    The HTTP Agent is used for pooling sockets used in HTTP client requests.

    The HTTP Agent is used for pooling sockets used in HTTP client requests. The HTTP Agent also defaults client requests to using Connection:keep-alive. If no pending HTTP requests are waiting on a socket to become free the socket is closed. This means that Node.js's pool has the benefit of keep-alive when under load but still does not require developers to manually close the HTTP clients using KeepAlive.

    Annotations
    @JSType() @native() @JSImport("http", "Agent")
  2. implicit final class AgentExtensions[T <: Agent] extends AnyVal
  3. trait AgentOptions extends Object
    Annotations
    @JSType()
  4. trait Client extends Object

    NodeJS HTTP Client

    NodeJS HTTP Client

    Annotations
    @JSType() @native()
  5. class ClientRequest extends Writable

    http.ClientRequest - This object is created internally and returned from http.request().

    http.ClientRequest - This object is created internally and returned from http.request(). It represents an in-progress request whose header has already been queued. The header is still mutable using the setHeader(name, value), getHeader(name), removeHeader(name) API. The actual header will be sent along with the first data chunk or when closing the connection.

    To get the response, add a listener for 'response' to the request object. 'response' will be emitted from the request object when the response headers have been received. The 'response' event is executed with one argument which is an instance of http.IncomingMessage.

    During the 'response' event, one can add listeners to the response object; particularly to listen for the 'data' event. If no 'response' handler is added, then the response will be entirely discarded. However, if you add a 'response' event handler, then you must consume the data from the response object, either by calling response.read() whenever there is a 'readable' event, or by adding a 'data' handler, or by calling the .resume() method. Until the data is consumed, the 'end' event will not fire. Also, until the data is read it will consume memory that can eventually lead to a 'process out of memory' error.

    Note: Node.js does not check whether Content-Length and the length of the body which has been transmitted are equal or not.

    Annotations
    @JSType() @native() @JSImport("http", "ClientRequest")
  6. implicit final class ClientRequestExtensions[T <: ClientRequest] extends AnyVal
  7. trait ConnectionOptions extends Object
    Annotations
    @JSType()
  8. trait GetNameOptions extends Object
    Annotations
    @JSType()
  9. trait Http extends Object

    To use the HTTP server and client one must require('http').

    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

  10. implicit final class HttpExtensions extends AnyVal

    Http Extensions

  11. class IncomingMessage extends Readable

    An IncomingMessage object is created by http.Server or http.ClientRequest and passed as the first argument to the 'request' and 'response' event respectively.

    An IncomingMessage object is created by http.Server or http.ClientRequest and passed as the first argument to the 'request' and 'response' event respectively. It may be used to access response status, headers and data. It implements the Readable Stream interface, as well as the following additional events, methods, and properties.

    Annotations
    @JSType() @native() @JSImport("http", "IncomingMessage")
    See also

    https://nodejs.org/api/http.html#http_class_http_incomingmessage

  12. implicit final class IncomingMessageExtensions[T <: IncomingMessage] extends AnyVal
  13. trait Information extends Object
    Annotations
    @JSType()
  14. trait OnreadObject extends Object
    Annotations
    @JSType()
  15. trait OutgoingMessage extends Writable

    Outgoing Message

    Outgoing Message

    Annotations
    @JSType() @native()
  16. trait RequestOptions extends Object
    Annotations
    @JSType()
  17. class Server extends net.Server

    http.Server - This class inherits from net.Server and has the following additional events

    http.Server - This class inherits from net.Server and has the following additional events

    Annotations
    @JSType() @native() @JSImport("http", "Server")
  18. implicit final class ServerExtensions[T <: Server] extends AnyVal
  19. trait ServerOptions extends Object
    Annotations
    @JSType()
  20. trait ServerResponse extends Writable

    Node.js http.ServerResponse

    Node.js http.ServerResponse

    Annotations
    @JSType() @native()
    See also

    https://nodejs.org/api/http.html#http_class_http_serverresponse

  21. implicit final class ServerResponseExtensions[T <: ServerResponse] extends AnyVal

    Server Response Events

  22. trait StatusCodes extends Object
    Annotations
    @JSType() @native()

Value Members

  1. object AgentOptions
  2. object ConnectionOptions
  3. object GetNameOptions
  4. object Http extends Object with Http

    Http Singleton

    Http Singleton

    Annotations
    @native() @JSImport("http", JSImport.Namespace)
  5. object OnreadObject
  6. object RequestOptions
  7. object ServerOptions

Inherited from AnyRef

Inherited from Any

Ungrouped