unshiftio / requests Goto Github PK
View Code? Open in Web Editor NEWA streaming XHR module for Node.js and browsers.
License: MIT License
A streaming XHR module for Node.js and browsers.
License: MIT License
Hello. Something that would make this library more approachable would be some improved documentation. In particular, although the events are enumerated, there is no description of what is passed to event handlers. This is also confusing:
The API is a mix between the Fetch API, mixed with EventEmitter API for the event handling.
It's not clear if this means that the Promise-based interface of the fetch API is available to use in addition to the documented API or if it's just the API as documented that can be used.
When I first ran the tests, two failed. It took me a minute to figure out the reason -- I was already running something at localhost:8080. Could you use a package like freeport to handle this issue?
16.3.0
to 16.4.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
browserify is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 5 commits.
8980670
16.4.0
f871a85
Update changelog.markdown
52de2c4
Merge pull request #1916 from browserify/stream-http
5dc1bf2
Upgrade stream-http to v3
4a5ea7e
Add funding.yml
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Chrome now supports ReadableByteStream
for more efficient streaming of chunked-transfer encoded responses. If you'd like to use it in this library, here's an implementation that could serve as a starting point.
Branch | Build failing π¨ |
---|---|
Dependency | browserify |
Current Version | 14.1.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As browserify is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
The new version differs by 5 commits .
18e1d65
14.2.0
0e1a7a0
add cli support for --transform-key to support mode's like production/staging/etc..
a5aa660
Merge pull request #1701 from wogsland/doc-fix
ae281bc
Fixed documentation formatting that was bugging me
fe8c57b
async test for node 7
See the full diff.
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
the title says everything, I need something to somehow use DNS Server like Cloudflare 1.1.1.1 to make requests because the website only works with it, any idea how? Thanks
Was reading the code and it doesn't look like this exists. Not a huge problem, just trying to understand if this is even possible in the browser. My gut tells me not since it would bypass the security settings of the browser itself if users had not made the security exception themselves beforehand.
I'm curious to known how this happen on the module, someone can help?
There is also a bug in firefox that will default content to an xmldocument if there is no content and no content type specified which will throw an exception when parsed.
https://bugzilla.mozilla.org/show_bug.cgi?id=521301
This works for me to get around the problem, but can certainly be improved upon (line 86 of browser.js):
var chunk = data.documentElement
? (!window.JSON ? '' : JSON.stringify(data))
: data.slice(requests.offset);
npm test
is not passing for the master branch of this repository. I have run this with node v4 and v6.
$ npm test
> [email protected] test /Users/me/Code/requests
> node test/index.js
requests
β is exported as function
1 passing (8ms)
# phantomjs:
requests
β is exported as function
β increments the internal `.id` for each instance
β sets the stream's booleans
β stores active requests
β does not receive content for 204 requests
1) can handle large files with streaming
Error: I should never be called
at test/requests.browser.js:64
at node_modules/eventemitter3/index.js:150
at browser.js:89
at node_modules/eventemitter3/index.js:151
at node_modules/loads/index.js:112
2) does not receive content for 204 requests
3) "after each" hook
Requested
β is exported as a function
#typeof
6 passing (2s)
3 failing
1) requests can handle large files with streaming:
Uncaught Error: I should never be called (http://localhost:50749/js/bundle:6735)
2) requests does not receive content for 204 requests:
done() called multiple times
3) requests "after each" hook:
Uncaught Error: Unknown assertation failure occured, assumed 0 to be greater than 1 (http://localhost:50749/js/bundle:1178)
β knows the difference between an array and object
4) "after each" hook for "knows the difference between an array and object"
7 passing (2s)
4 failing
1) requests can handle large files with streaming:
Uncaught Error: I should never be called (http://localhost:50749/js/bundle:6735)
2) requests does not receive content for 204 requests:
done() called multiple times
3) requests "after each" hook:
Uncaught Error: Unknown assertation failure occured, assumed 0 to be greater than 1 (http://localhost:50749/js/bundle:1178)
4) "after each" hook for "knows the difference between an array and object":
undefined is not an object (evaluating 'fn.call')
Error: Exit 1
Hey, just had a look at the source and saw this: https://github.com/unshiftio/requests/blob/master/browser.js#L106
Just a heads up if it's misspelled :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.