Skip to content
tcr edited this page Mar 15, 2013 · 1 revision

A Rem Client models an API. Calls for a client follow this format:

api[.format]([url fragments]).method([[query,] mime, body,] callback(err, data[, response]))

Classes

rem.ClientRequest

on 'pipe' // piped into other stream

req.headers
req.setHeader(key, value)
req.getHeader(key)
req.removeHeader(key)
req.url.protocol
req.url.auth
req.url.hostname
req.url.port
req.url.pathname
req.url.query
req.url.hash
req.url.getHost()
req.url.getPath()
req.url.toString()
req.url.parse(str)
req.write(chunk, [encoding])
req.end([data], [encoding])
req.send() // returns rem.ClientCall

rem.ClientResponse

emits 'data', 'end', 'close'

res.statusCode
res.httpVersion
res.headers
res.setEncoding([encoding])
res.pause()
res.resume()

OAuthentication

oauth.start([params], next(url, requestToken, requestSecret, results)) oauth.complete([verifier], requestToken, requestSecret, callback) oauth.complete([verifier], requestToken, requestSecret, callback)