Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
doc: add tools
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
skenqbx committed Apr 25, 2015
1 parent b542b74 commit cec05fd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/api.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- [Exports](#exports)
- [RAIL.plugins](#railplugins)
- [RAIL.tools](#railtools)
- [RAIL.globalClient](#railglobalclient)
- [RAIL.call(urlOrOptions, responseListener)](#railcallurloroptions-responselistener)
- [Class: RAIL](#class-rail)
Expand Down Expand Up @@ -43,6 +44,20 @@
### RAIL.plugins
An object holding all built-in [plugins](./doc/plugins.markdown).

### RAIL.tools

#### tools.copyHeaders(target, source, defaults)
Copies all properties, _headers_ in this case, from either the `source` or the `defaults` to the `target`.

#### tools.copy(target, source, defaults, keys)
Copies all properties in `keys` from either the `source` or the `defaults` to the `target`.

#### tools.parseURL(url)
Parses an URL into an object with `proto`, `host`, `port` & `path`.

#### tools.applyURL(target, url)
Applies `proto`, `host`, `port` & `path` of an URL to the `target`.

### RAIL.globalClient
A global `RAIL` object pre-loaded with `buffer`, `json`, `redirect`, `cookies`, `timeout`, `validate` & `retry` plugin.

Expand Down

0 comments on commit cec05fd

Please sign in to comment.