class RequestOptions extends Object
Client Request Options
- Annotations
- @RawJSType() @ScalaJSDefined()
- See also
- Alphabetic
- By Inheritance
- RequestOptions
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
RequestOptions(protocol: UndefOr[String] = js.undefined, host: UndefOr[String] = js.undefined, hostname: UndefOr[String] = js.undefined, family: UndefOr[String] = js.undefined, port: UndefOr[Int] = js.undefined, localAddress: UndefOr[String] = js.undefined, socketPath: UndefOr[String] = js.undefined, method: UndefOr[String] = js.undefined, path: UndefOr[String] = js.undefined, headers: UndefOr[Object] = js.undefined, auth: UndefOr[String] = js.undefined, agent: UndefOr[String] = js.undefined, createConnection: UndefOr[Function] = js.undefined)
- protocol
Protocol to use. Defaults to 'http:'.
- host
Alias for host. To support url.parse() hostname is preferred over host.
- hostname
Alias for host. To support url.parse() hostname is preferred over host.
- family
IP address family to use when resolving host and hostname. Valid values are 4 or 6. When unspecified, both IP v4 and v6 will be used.
- port
Port of remote server. Defaults to 80.
- localAddress
Local interface to bind for network connections.
- socketPath
Unix Domain Socket (use one of host:port or socketPath).
- method
A string specifying the HTTP request method. Defaults to 'GET'.
- path
Request path. Defaults to '/'. Should include query string if any. E.G. '/index.html?page=12'. An exception is thrown when the request path contains illegal characters. Currently, only spaces are rejected but that may change in the future.
- headers
An object containing request headers.
- auth
Basic authentication i.e. 'user:password' to compute an Authorization header.
- agent
Controls Agent behavior. When an Agent is used request will default to Connection: keep-alive. Possible values: TODO
- createConnection
A function that produces a socket/stream to use for the request when the agent option is not used. This can be used to avoid creating a custom Agent class just to override the default createConnection function.
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
- var agent: UndefOr[String]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- var auth: UndefOr[String]
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- var createConnection: UndefOr[Function]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- var family: UndefOr[String]
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- var headers: UndefOr[Object]
- var host: UndefOr[String]
- var hostname: UndefOr[String]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- var localAddress: UndefOr[String]
- var method: UndefOr[String]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- var path: UndefOr[String]
- var port: UndefOr[Int]
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- var protocol: UndefOr[String]
- var socketPath: UndefOr[String]
-
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( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )