-
-
Notifications
You must be signed in to change notification settings - Fork 926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move jsonp to its own method? #1068
Comments
Works for me. Also, a plain string URL should be accepted for the common case IMO, using the "GET" for //xhr
m.xhr({url: url, method: "GET"})
m.xhr({url: url})
m.xhr(url)
//jsonp
m.jsonp({url: url})
m.jsonp(url) Although...isn't XHR moot with the Fetch API? Beyond a few infrequent cases like progress notifications and cancellability (not just "don't care" that's being proposed at WHATWG), what's the benefit? |
|
@Naddiseo Leo is just considering separating the two methods completely. The two cases share deceptively little code in the first place, anyways. As for the name, I'd prefer |
They actually share a lot of code, but it just seems somewhat silly that the signature completely changes based on whether there's a |
@lhorie Eh...I didn't remember all the common option handling until after I wrote that... They share quite a bit of code, but it's the actual launching of the request that's very different. There's just a lot less to configure with JSONP than with XHRs. |
Ok so I kept |
Totally bikeshedding, but what do you guys think about moving jsonp to its own method in v1.0?
Current behavior:
Proposed:
The text was updated successfully, but these errors were encountered: