Comments (2)
Oh lame, I was under the impression this was possible w/ either the deserialize
or the unwrapError
options, but I just realized it's not... I'll need to expose another option to allow this.
from mithril.js.
There's now an extract
option to allow custom dereferencing of the xhr object
//return status code if error
var extractStatus = function(xhr, xhrOptions) {
return xhr.status != 200 ? xhr.status : xhr.responseText
}
m.request({method: "GET", url: "/foo", extract: extractStatus})
This addition is on origin/next and scheduled to be released in v0.1.9
from mithril.js.
Related Issues (20)
- There is no onsize/onresize lifecycle method HOT 4
- Typescript return type for mithril components HOT 14
- warning 'reuse attrs object' while receiving a component from high order function/component HOT 4
- Broken link to ospec in API page
- make vite the default HOT 4
- Redraw on resolve of async event handler HOT 1
- Please update the Vue comparison HOT 1
- onbeforeremove not being triggered when list element is removed HOT 2
- Form attribute not set in custom element HOT 1
- Add "main" field to package.json HOT 1
- Need help with "Failed to execute 'insertBefore' on 'Node'" errors. HOT 2
- Is there a bug with dynamically changing svgs? HOT 15
- Current vnode `dom` property is undefined in `onbeforeupdate` HOT 4
- Not getting any events to handle resize HOT 1
- Been a while since the last commit, is Mithril complete? or abandoned? HOT 13
- We have both `main` and `master`. Let's drop both and just rely on a global `next` + version-specific `next`s. HOT 2
- JSFiddle links are broken in CI HOT 4
- htm with Mithril.js HOT 3
- Deprecated dependencies `inflight` and `glob` HOT 3
- Tracking issue for unblocking pre-release deployments
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mithril.js.