Commit graph

14 commits

Author SHA1 Message Date
Stephan Hoyer
716d1e1804 Kick jsonp - fixes #2682 2022-06-06 12:56:25 +02:00
James Cote
99c6d813d2
Send URLSearchParams as request body without extra configuration (#2695) 2022-01-31 10:12:02 +01:00
Kevin Fiol
f5b41aaf0f
Reject request on XHR timeout (#2646)
Co-authored-by: Zachary Hamm <hamm.zachary@gmail.com>
2020-12-23 02:42:03 -08:00
Isiah Meadows
8eed896859
Track XHR replacements correctly (#2455)
* Track XHR replacements correctly

Fixes #2439

* Update docs [skip ci]
2019-07-05 19:50:51 -04:00
Isiah Meadows
85bfd0f77d
Clarify pathname docs, follow spec with fragments (#2448)
* Clarify pathname docs, follow spec with fragments

- Valid URLs must not contain a `#` within its fragment.
  https://github.com/MithrilJS/mithril.js/issues/2445
- Our docs were a little confusing and misleading - `m.pathname` isn't
  aware of URLs, just path names.
- Removed the relevant extension to `m.parseQueryString` required to
  support the hash parsing extension. Now we just shave it off and
  ignore it.
- Fix support for arbitrary prefixes, so prefixes like `?#` are
  handled correctly.
- Add a bunch of tests to cover various areas of confusion and unusual
  edge cases.

* Update with PR [skip ci]
2019-07-03 06:22:25 -04:00
Isiah Meadows
794e8e963f
Bring some sanity to request parsing and error handling (#2335)
* Update docs/request.md
* Bring some sanity to request parsing and error handling

- The browser can do JSON parsing itself. Let's defer to that where
  possible. (A few IE hacks are required here, though.)
- Don't propagate any error that occurs before `deserialize`/`extract`.
- Allow sending raw array buffers/blobs/etc. to `deserialize`.
- Align behavior more closely with the XHR spec.
- Send the more useful parsed response to `deserialize`, not the less
  useful string response.
2019-05-29 09:41:22 -04:00
Isiah Meadows
7cbc15e7a2
Fix m.request/m.jsonp to not mutate arguments, simplify code (#2288)
I basically recast it to remove 99% of the duplication. They're
basically the same function mod how they fire their requests and append
query parameters.
2018-11-28 20:10:46 -05:00
tkilliansc
62bc8a5481 fix issue 1919 2017-10-14 00:06:32 +02:00
Isiah Meadows
1cc5fa5ba7 "use strict" and other linty fixes 2017-03-03 18:24:38 -05:00
Bryce Gibson
6a617aeb87 Add tests for abort functionality. 2017-02-12 16:38:45 +11:00
Leo Horie
a0def08101 lint and highlight jsx 2017-01-08 19:30:23 -05: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
impinball
b4fb21475c Add editorconfig, resolve differences
This includes newlines, tabs, among other things.
2016-06-18 03:22:12 -04:00
Leo Horie
41ac2bf002 rename ajaxt o xhr, expose jsonp 2016-05-26 15:22:36 -04:00
Renamed from test-utils/ajaxMock.js (Browse further)