Commit Graph

46 Commits

Author SHA1 Message Date
James Trinklein
53c667d1a5 Update restify typings (#9379)
* restify: update Request, fix id type

change id from string property to function returning string
add getId() alias
include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L214

* restify: update Request, add getPath()

include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L234

* restify: update Request, fix query type

define query as function returning a string
add getQuery() alias
include JSDoc from source:
https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L247

* restify: update Request, fix time type

change time from number property to function returning number
include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L262

* restify: update Request, add getUrl

include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L273

* restify: update Request, add getVersion

getVersion is a function that returns a string
add version() alias
include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L288

* restify: update Request, fix header type

change header return type from any to string
include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L316

* restify: update Request, add trailer

trailer is a function that returns a string
trailer requires a string parameter called name
trailer optionally takes a second string parameter for default value

include JSDoc from source:
https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L338

* restify: update Request, add JSDoc

include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L359

* restify: update Request, add isChunked

isChunked is a function that returns a boolean
include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L394

* restify: update Request, add isKeepAlive

isKeepAlive is a function that returns a boolean
include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L405

* restify: update Request, add JSDoc for isSecure

include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L426

* restify: update Request, add isUpgradeRequest

isUpgradeRequest is a function that returns a boolean
include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L442

* restify: update Request, add isUpload

isUpload is a function that returns a boolean
include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L457

* restify: update Request, add userAgent

userAgent is a function that returns a boolean
include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L494

* restify: update Request, add start/endHandlerTimer

startHandlerTimer is a function that takes a string
endHandlerTimer is a function that takes a string

include JSDoc from source:
https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L505

* restify: update Request, add absoluteUri

absoluteUri is a function that takes a string and returns a string
include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L52

* restify: update Request, fix accepts

accepts can take a parameter of either string or array of strings
include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L68

* restify: update Request, add acceptsEncoding

acceptsEncoding is a function that returns a boolean
acceptsEncoding can take a parameter of either string or array of strings

include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L96

* restify: update Request, fix contentLength

add getContentLength which is a function which returns a number
contentLength is an alias for getContentLength function

include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L116

* restify: update Request, fix contentType

add getContentType which is a function which returns a string
contentType is an alias for getContentType function

include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L152

* restify: update Request, add getHref

getHref is a function which returns a string
href is an alias to getHref

include JSDoc from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L202

* restify: update Request, add timers

timers is an array of handler timer objects
a handler timer object contains a string name and tuple of numbers representing the elapsed time
this is the only way to access times from start/endHandlerTimer()
from source: https://github.com/restify/node-restify/blob/5.x/lib/request.js\#L557

* restify: update RouteSpec, fix path

path can be either a string or RegExp
also shown in RouteOptions.path
2016-06-02 23:52:47 +09:00
James Trinklein
58e16ecbc3 Update restify types add route spec (#9082)
* restify: fix compile errors in test file

did not compile without error when compiling with:
`tsc --noImplicitAny restify/restify-tests.ts`

* restify: add RouteSpec interface
2016-04-25 23:10:54 +09:00
vvakame
56295f5058 replace https://github.com/borisyankov/DefinitelyTyped to https://github.com/DefinitelyTyped/DefinitelyTyped 2016-03-17 00:55:26 +09:00
vvakame
4de74cb527 normalize line ending (CRLF -> LF) 2016-02-16 01:20:30 +09:00
Masahiro Wakame
7f2626d4e5 Merge pull request #7537 from SamuelMarks/patch-2
Next.ifError
2016-01-11 22:55:03 +09:00
Samuel Marks
4dd5bea6f4 Next.ifError => 070725fa3e 2016-01-08 23:53:19 +11:00
James O'Cull
d2443f6855 Proper returns on server use/route 2016-01-06 14:22:14 -05:00
James O'Cull
1140e9393f Added Restify Router render function 2016-01-06 13:53:52 -05:00
James O'Cull
b7e9564fdd Add router /routes support to Restify 2016-01-06 13:34:44 -05:00
James O'Cull
9e4b7a31d5 Changes to support authorizationParser 2015-12-30 12:24:56 -05:00
James O'Cull
aeb8fefd8b Add definition for request files 2015-12-29 14:44:13 -05:00
James O'Cull
6ae08bfbab Support optional headers in response send / json calls 2015-12-29 14:30:24 -05:00
Max Shmelev
6b0270532c Add 'opts' function definition 2015-12-14 10:32:03 -05:00
Vladimir
b65f3c4365 handleUpgrades option support in ServerOptions interface
http://restify.com/#creating-a-server

In restify docs createServer method supports handleUpgrades parameter in ServerOptions object, but it's not present in the type's interface.
2015-11-25 17:52:21 +01:00
Moritz Schmidt
08f99d437b fix restify error classes
* add missing restify error classes
	* overloaded constructor
	* more constructor tests
2015-03-31 20:54:00 +02:00
Eric Lu
188590dce9 Expose isSecure function through request interface 2015-02-09 12:29:46 -08:00
Eric Lu
938122b49b Expose raw http server 2015-02-03 10:07:56 -08:00
Eric Lu
a3a941b342 Expose two more error types. 2015-01-26 19:27:38 -08:00
Eric Lu
ff0c34bc71 Add typing for bunyan logger associated with Request 2015-01-09 15:47:05 -08:00
Niklas Mollenhauer
3abe86c6fe Fixes #2810 2014-09-12 02:44:31 +02:00
Mohamed Hegazy
2aaa293cb1 Remove quotes from response files 2014-09-02 14:53:39 -07:00
Santi Albo
d50f5e11ef Add restify pre example of use on the tests 2014-03-18 09:34:39 +00:00
Santi Albo
8b0c6cab78 Add restify pre module 2014-03-18 09:32:20 +00:00
Masahiro Wakame
2e5ad83aee Merge pull request #1829 from santialbo/patch-4
Fix typo on restify type definition
2014-03-15 21:53:06 +09:00
Santi Albo
418438f064 Fix typo on test 2014-03-15 13:12:19 +01:00
Santi Albo
90dd6ead84 Fix typo on restify type definition
InvalidArgu**e**mentError => InvalidArgumentError
2014-03-12 11:49:04 +00:00
Santi Albo
071788e345 Add CORS method on restify module 2014-03-10 16:44:30 +00:00
Václav Oborník
f788ac6ca4 renamed 'next' intarface to 'Next' 2014-03-09 06:23:11 +01:00
Václav Oborník
5eaf82aa6a method Server.use can accept arrays of RequestHandlers 2014-03-08 15:50:08 +01:00
Václav Oborník
ac22449387 added 'next' interface, route binding methods can have multiple request handlers and accepts arrays of handlers 2014-03-08 15:38:17 +01:00
Václav Oborník
1f92231282 Request.query is any 2014-03-07 22:43:01 +01:00
Santi Albo
7a521a2f56 Fix typo on restify type definition 2014-03-07 14:05:23 +00:00
Václav Oborník
dd908b1f72 Removed 'on' method from Server - it is inherited now. Added body property to request definition 2014-03-02 14:19:37 +01:00
Václav Oborník
4dbe22c267 Moved definitions from global (evil) context to 'restify' module/namespace, added inheritance of Server, Request and Response from nodejs 'http' module 2014-03-02 13:52:38 +01:00
vvakame
6ab4ffae2b Remove not required tscparams 2014-01-02 16:34:52 +09:00
Václav Oborník
ee212d0ece Restify: updated plugin defintions, allowed --noImplicitAny compile flag 2013-12-14 00:06:24 +01:00
vvakame
2708bc05cd Fixed tsc failed on Node.js v0.8.25 2013-10-03 11:23:38 +09:00
vvakame
3fe1f6bc4e Fixed to CI test passing 2013-10-03 10:18:58 +09:00
gstamac
e377e15866 Restify: changed "import module" to "import require" 2013-08-23 14:01:06 +02:00
Boris Yankov
dd35f69637 Big replacement: bool with boolean 2013-08-07 16:59:39 +03:00
Neil Stalker
182b290dc4 fix filewriter, restify and chrome definitions 2013-06-24 12:49:31 +01:00
Diullei Gomes
7147d06d3e Merge pull request #295 from blittle/master
Update restify definition
2013-02-17 12:56:29 -08:00
Bret Little
5a765895ca Udate the restify definition so that the request attributes path and href
are functions rather than string properties.
2013-02-17 13:32:43 -07:00
Diullei Gomes
1fd9f45cd2 restfy header was normalized. 2013-02-16 18:44:25 -02:00
Bret Little
baa2dc5651 Finish restify typescript definition including its server and client api 2013-02-14 13:46:32 -07:00
Bret Little
204569719e Add restify definition 2013-02-12 22:08:16 -07:00