
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
hyperrest-bin
Advanced tools
A simple HTTP service with controlled behaviour, inspired by httpbin.
The service makes use of HTTP headers, and predominantly X-Prefer, in order to allow the client to control server behaviour.
Additionaly it also makes use of know-your-http-well and acts as a bookmarking tool for specification of HTTP status codes, headers, methods and relations.
This project is live at bin.hyperrest.com and has a search engine for convenience.
npm install hyperrest-bin
hyperrest-bin # or PORT=1337 hyperrest-bin
curl http://127.0.0.1:1337 # README.md
curl http://127.0.0.1:1337/* # README.md on any path
curl -XPOST http://127.0.0.1:1337 # README.md
curl -XPOST -H"Accept: application/json" http://127.0.0.1:1337 # JSON TRACE
curl -XPOST -H"Accept: application/xml" http://127.0.0.1:1337 # XML TRACE
# TRACE, METHOD OVERRIDE
curl -XTRACE http://127.0.0.1:1337 # message/http TRACE
curl -XPOST -H"X-HTTP-Method-Override: TRACE" http://127.0.0.1:1337 # message/http TRACE still
curl -XTRACE -H"Accept: application/json" http://127.0.0.1:1337 # JSON TRACE
curl -XTRACE -H"Accept: application/xml" http://127.0.0.1:1337 # XML TRACE
# ORIGINATING IP
# see response
# GZIP/DEFLATE
curl -H"Accept-Encoding: gzip,deflate" http://127.0.0.1:1337 # GZIP README.md
# PREFER (as per registered preferences)
curl -H"X-Prefer: status=404" http://127.0.0.1:1337 # 404 Not Found
curl -H"X-Prefer: wait=10" http://127.0.0.1:1337 # wait 10 seconds, then README.md
curl -H"X-Prefer: return-minimal" http://127.0.0.1:1337 # 200 OK, but no README.md
curl -H"X-Prefer: return-representation" -H"Accept:text/html" http://127.0.0.1:1337 # return README.md by force
# PREFER (as per extensions of preferences)
curl -H"X-Prefer: cookie=name1|v, cookie=name2|v" http://127.0.0.1:1337 # set cookies "name1" and "name2"
curl -H"X-Prefer: cookie=name1" http://127.0.0.1:1337 # delete cookie "name1"
# PREFER response as defined in the request body
curl -XPOST \
-H"Content-Type: application/json" \
-H"X-Prefer: return-request" \
-d'{"status":"200", \
"headers":{"Content-Type":"text/plain"}, \
"body":"TEXT"
}' http://127.0.0.1:1337 # return 200, etc.
# https://github.com/andreineculau/know-your-http-well
curl http://127.0.0.1:1337/method/{value} # Specification for HTTP Status Code
curl http://127.0.0.1:1337/header/{value} # Specification for HTTP Header
curl http://127.0.0.1:1337/statusCode/{value} # Specification for HTTP Method
curl http://127.0.0.1:1337/rel/{value} # Specification for HTTP Relation
curl http://127.0.0.1:1337/spec/{value} # Specification for HTTP AnyOfTheAbove (I feel lucky mode)
FAQs
A simple HTTP service with controlled behaviour
The npm package hyperrest-bin receives a total of 0 weekly downloads. As such, hyperrest-bin popularity was classified as not popular.
We found that hyperrest-bin 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
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.