![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Hoxy is an HTTP traffic-sniffing and manipulation tool for JavaScript programmers.
var hoxy = require('hoxy');
var proxy = hoxy.createServer().listen(8080);
proxy.intercept({
// intercept during the response phase
phase: 'response',
// only intercept html pages
mimeType: 'text/html',
// expose the response body as a cheerio object
// (cheerio is a jQuery clone)
as: '$'
}, function(req, resp) {
resp.$('title').text('Unicorns!');
// all page titles will now say "Unicorns!"
});
Hoxy has released version 3.0. This release simplifies the API and better supports ES6. Notable changes:
done
callback is no longer passed as the third arg to interceptors. Interceptor arity is, accordingly, no longer a switch for async behavior. Rather, it solely depends on the return type of the interceptor (i.e. promises or iterators over promises).cycle
object, === to this
. This was based on a suggestion from @nerdbeere, with a view toward supporting arrow functions, in which this
is lexical.hoxy.forever()
function goes away.content-length
and transfer-encoding
headers.query
getter/setter to request.Proxy#log()
chainable.EADDRNOTAVAIL
on Windows when using certAuthority
.Cycle#serve()
breakage on Windows.as
intercepts weren't catching async errors properly.as
intercept fix..buffer
was always undefined. Thanks @Timwi.npm test
instead of mocha
. Proxy close()
method now passes args through to server close. Thanks Seth Holladay.listen()
accept same args as native server.listen()
instead of just port. Thanks Seth Holladay.tee()
method to requests and responses, and accompanying tests.I began writing code for this in 2010 while I worked at Cisco—and later at various startups—to solve my own needs for advanced testing and debugging production websites. The most common—although by no means only—use case for me was swapping in my own JavaScript onto web pages, in order to do rapid debugging without actually pushing console.logs to a staging server or (god forbid!) production. I could just edit a file on my local disk and reload my browser.
This enabled me to act quickly when hard-to-debug production issues arose, which translated into a competitive advantage for both myself and my company. Over time, however, I've used it less frequently, for a few reasons:
All of that said, this is still a valuable tool in my toolbox, and I use it when the need arises. I'm not putting much time and attention into bug fixes and feature improvements these days, but PRs are always welcome!
FAQs
Web-hacking proxy API for node
The npm package hoxy receives a total of 1,454 weekly downloads. As such, hoxy popularity was classified as popular.
We found that hoxy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.