This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor License Agreement | |
Definitions: "You" means the individual or legal entity who submits a contribution, "We" or "Us" means Toolshed Labs SLU (the organization behind the HTTP Toolkit open-source project) and its manager & representative Timothy Hugh Perry (https://github.com/pimterry). | |
By contributing Your code to this project You grant Us a non-exclusive, irrevocable, worldwide, royalty-free, sublicenseable, transferable license under all of Your relevant intellectual property rights (including copyright, patent, and any other rights), to use, copy, prepare derivative works of, distribute and publicly perform and display the contributions on any licensing terms, including without limitation: (a) open source licenses like the MIT license; and (b) binary, proprietary, or commercial licenses. Except for the licenses granted herein, You reserve all right, title, and interest in and to the contribution. | |
You confirm that You are able to grant Us these rights. You represent that You are legally entitle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const awaitFirst = (promises) => | |
new Promise((resolve, reject) => { | |
let count = promises.length; | |
promises.forEach(p => | |
p.then(resolve, (e) => { | |
count = count - 1; | |
if (count === 0) reject(e); | |
}) | |
); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mockttp = require('mockttp'); | |
const server = mockttp.getLocal(); | |
server.start().then(async () => { | |
// This creates a proxy rule, which will forward all traffic to the real server: | |
await server.anyRequest().thenPassThrough({ | |
// Every time the real server gets a response, this callback will be called: | |
beforeResponse: (response) => { | |
console.log(`Got ${response.statusCode} response with body: ${response.body.text}`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"log": { | |
"version": "1.2", | |
"creator": { | |
"name": "HTTP Toolkit", | |
"version": "16b657aaeff07eec548e31ccf2d5573154e287ba" | |
}, | |
"pages": [ | |
{ | |
"id": "Curl/7.68.0", |
OlderNewer