Mike Gerwitz
45889f556f
DataApiManager: emit fieldLoaded after request completes
...
The intent of this is to allow for clearing errors after fields
load (e.g. a "field loading" message if the user attempts to continue
past the step when a field hasn't yet finished loading).
* src/dapi/DataApiManager.js (getApiData): Emit fieldLoaded after
request completes.
* test/dapi/DataApiManagerTest.js: Add test case.
DEV-2299
2017-02-22 09:53:59 -05:00
Mike Gerwitz
7651e9499f
Remove debugging console.log from XhrHttpImplTest
...
* test/dapi/http/XhrHttpImplTest.js: Remove accidentally-committed
console.log
2016-04-19 00:05:47 -04:00
Mike Gerwitz
a6115018d2
Add x-www-form-urlencoded header for XhrHttpImpl
...
It might be the case that we may want to post raw data in the future; in
fact, I can guarantee it. We'll cross that bridge when we come to it.
* src/dapi/http/XhrHttpImpl.js (openRequest): Set ContentType header
on POST
* test/dapi/http/XhrHttpImplTest.js: Modified accordingly
2016-04-14 12:08:00 -04:00
Mike Gerwitz
a383a36bfc
HttpDataApi#request permits null data
2015-05-29 12:45:02 -04:00
Mike Gerwitz
0599acc23a
Key-value param encoding moved from XhrHttpImpl to HttpDataApi
2015-05-29 12:22:26 -04:00
Mike Gerwitz
f122d85938
XhrHttpImpl modify URL for GET request params and encode key-value
...
Some of this may be more appropriate to move out of XhrHttpImpl into
something like HttpDataApi...
2015-05-29 09:35:21 -04:00
Mike Gerwitz
881e740bb9
JsonResponse returns parse error or combined request/parse on failure
2015-05-28 15:15:41 -04:00
Mike Gerwitz
ca68d12370
XhrHttpImpl no longer modifying response text
...
Status code included with error object
2015-05-28 15:15:41 -04:00
Mike Gerwitz
8f9b8f779f
JsonResponse retain output value on request error
2015-05-28 15:15:41 -04:00
Mike Gerwitz
57886e66d0
JsonResponse test ensure parse error is of type `SyntaxError`
...
Previously `Error`.
2015-05-28 15:15:41 -04:00
Mike Gerwitz
e8344e36bb
dapi.format.JsonResponse response text output value on parse failure
2015-05-28 15:15:41 -04:00
Mike Gerwitz
1669f9eeda
XhrHttpImpl#request invokes XHR send
...
This should have always been the case; I am not sure what I was thinking,
considering that the object is encapsulated.
2015-05-28 15:15:39 -04:00
Mike Gerwitz
76280b0cac
AutoRetry distinction between predicate truth and request failure
2015-05-28 15:03:50 -04:00
Mike Gerwitz
2b92a2c447
JsonResponse#request must be virtual
...
To suppor trait stacking.
2015-05-28 15:03:48 -04:00
Mike Gerwitz
af4a775155
AutoRetry delay implementation
2015-05-27 15:25:43 -04:00
Mike Gerwitz
ca5d064455
AutoRetry trait initial implementation
2015-05-27 15:25:42 -04:00
Mike Gerwitz
8fbd4dd220
XhrHttpImpl#serveError
2015-05-12 16:32:49 -04:00
Mike Gerwitz
d4328968e8
XhrHttpImpl considers any 2xx status to be successful
2015-05-12 16:32:49 -04:00
Mike Gerwitz
6cc260b443
XhrHttpImpl#isSuccessful determines HTTP response success
...
May be overridden by subtypes.
2015-05-12 16:32:48 -04:00
Mike Gerwitz
b4ef6439e9
JsonDataApi=>JsonResponse trait
...
This cuts down on the code significantly and makes more sense, since we
would not want to veil the API of any classes that want to use this.
2015-05-12 16:32:43 -04:00
Mike Gerwitz
0a07ad4982
Added JsonDataApi
2015-05-12 13:45:19 -04:00
Mike Gerwitz
6d0acf5916
Initial XhrHttpImpl implementation
2015-05-12 13:45:19 -04:00
Mike Gerwitz
e0f1c600ba
Began liberating DataApi
...
The Data API is being heavily refactored and tested; while moving files into the
Liza repository, I noticed some inefficiencies with the design. These are being
heavily improved upon.
2015-05-12 13:45:19 -04:00