Commit graph

49 commits

Author SHA1 Message Date
Stephan Hoyer
d50d53f31d feat: Add support for timeout to m.request (#1966) 2017-11-14 14:47:01 -08:00
spacejack
80b6a1af0d feat: Don't reject m.request Promise if extract callback supplied (#2006) 2017-11-13 08:08:54 -08:00
tkilliansc
b4856a9ecd fix issue 1919 2017-08-03 13:48:19 -07:00
Pat Cavit
5aac004709 refactor: XHR errors have response/code fields
So that there's no chance of data loss and it's trivial to get the response code (because it's hella useful)

Fixes #1866
Fixes #1876
2017-07-18 22:53:17 -07:00
Leo
ed5d9a2711 update linter 2017-02-23 18:45:47 -05:00
Leo
e019c8131c fix merge conflicts for #1610 2017-02-23 18:41:46 -05:00
Yoshiki Shibukawa
b86805ada3 when method is GET and TRACE, useBody becomes always false 2017-02-19 22:03:44 +09:00
Bryce Gibson
27881af668 Ignore xhr.status for "file://" requests. 2017-02-15 08:34:40 +11:00
Bryce Gibson
9558c8e2e9 Avoid inaccurately inferring xhr abort.
xhr.status can equal zero in non-abort scenarios, eg timeout or CORS
failure.

Instead use a variable to track aborts.
2017-02-10 18:18:14 +11:00
Leo
1b43c3a106 allow array data in m.request 2017-01-23 18:03:33 -05:00
Hugo Freitas
4a98bb0503 remove mutating of interpolate data 2017-01-17 01:05:09 -03:00
Magnus Leo
a640eaeb44 Comment why the request abort error happens 2017-01-13 11:27:54 +01:00
Magnus Leo
bfccd1b6bf Fix request abort error 2017-01-13 09:29:28 +01:00
Barney Carroll
fbb454c6fd Merge branch 'rewrite' into array-isArray 2017-01-04 14:24:07 +00:00
impinball
95d738bc71 Add support for options.headers in m.request + tests/docs
I also had to edit the mocks accordingly, so I could inspect the headers set.
2016-12-30 02:52:00 -05:00
Barney Carroll
aa72f87408 Merge branch 'rewrite' into array-isArray 2016-12-16 10:51:39 +00:00
Leo Horie
65ef101aff don't log intermediate uncaught promise errors in request 2016-12-07 11:22:59 -05:00
Barney Carroll
1050ade7c8 Merge branch 'rewrite' into array-isArray 2016-12-05 19:12:01 +00:00
Leo Horie
1fe4a08e71 lint 2016-12-02 22:03:23 -05:00
Leo Horie
0dce0e7911 normalize args for jsonp, document background option 2016-12-02 21:19:45 -05:00
Leo Horie
0080d1dff0 fix request redrawing semantics 2016-12-02 17:42:34 -05:00
Barney Carroll
d82d337569 Replace x instanceof Array with Array.isArray(x) 2016-11-24 09:21:27 +00:00
Leo Horie
d1c2a44de8 add withCredentials option in m.request 2016-11-23 01:35:56 -05:00
Leo Horie
bc8cf4ed76 change m.request return value from stream to promise
remove m.prop
add m.Promise
update tests and examples
2016-11-13 22:44:22 -05:00
Leo Horie
717186a3b6 clean up 2016-11-11 17:57:16 -05:00
Barney Carroll
beccd16dd7 Fetch-style signature overload 2016-11-11 18:37:56 +00:00
Leo Horie
95194e8c15 Merge remote-tracking branch 'origin/rewrite' into rewrite
# Conflicts:
#	mithril.min.js
2016-11-10 10:13:21 -05:00
Leo Horie
4dd66a7e65 don't send undefined body 2016-11-10 10:12:05 -05:00
valtron
bcab77696c [rewrite] Case-insensitivize method in m.request 2016-11-04 22:16:44 -06:00
Leo Horie
8c5fd9ec25 lint 2016-09-23 22:49:20 -04:00
Leo Horie
edea16575d special case 304 2016-09-12 10:26:08 -04:00
Leo Horie
f201ea73ff ensure internal streams have same constructor as public streams 2016-08-24 01:08:20 -04:00
Leo Horie
80c25e3809 rename routeresolver methods to {onmatch,view}
expose some piecemeal modules
rename internal xhr to request
mirror internal stream api to match public api
2016-08-17 00:10:47 -04:00
Leo Horie
6c3036e5c6 fix event removal in diff
fix CI
2016-08-12 22:08:02 -04:00
Patrik Johnson
88e7cf5454 Rewrite: ignore m.request deserialize option if extract is passed 2016-08-04 19:19:12 +03:00
Leo Horie
3a19dddb22 more docs 2016-08-04 00:00:31 -04:00
Leo Horie
09a0464a01 don't break tests in node 2016-07-29 08:49:57 -04:00
Leo Horie
fbb324e433 simplify handling of FormData 2016-07-28 22:34:16 -04:00
Leo Horie
a6c56ff6b9 resolve hook in router 2016-07-11 09:50:00 -04:00
Leo Horie
36e6894859 extend rejection reason w/ json error on request error 2016-06-24 21:40:11 -04:00
Leo Horie
794d32d7d1 initialValue arg 2016-06-24 15:58:30 -04:00
Leo Horie
bce2abbffd Merge remote-tracking branch 'origin/rewrite' into rewrite
Conflicts:
	docs/keys.md
	docs/signatures.md
	docs/v1.x-migration.md
	index.js
	ospec/bin/ospec.cmd
	request/request.js
	request/tests/test-xhr.js
	util/prop.js
	util/tests/index.html
	util/tests/test-prop.js
2016-06-20 09:34:14 -04:00
Leo Horie
b9ce90765d streams implementation 2016-06-20 09:21:25 -04:00
impinball
b4fb21475c Add editorconfig, resolve differences
This includes newlines, tabs, among other things.
2016-06-18 03:22:12 -04:00
Leo Horie
ddc430a6d3 fix most gcc warnings 2016-06-03 23:55:31 -04:00
Leo Horie
41ac2bf002 rename ajaxt o xhr, expose jsonp 2016-05-26 15:22:36 -04:00
Leo Horie
e7420e72e1 more tests 2016-05-24 23:16:43 -04:00
Pat Cavit
2ca8fa6e66 Quiet some ESLint errors (#1060)
Some via config, a few via code edits
2016-05-19 22:18:31 -07:00
Leo Horie
559369016d initial commit (work in progress) 2016-04-20 20:02:37 -04:00