0.5.2 • Published 1 year ago

aminiq v0.5.2

Weekly downloads
4
License
MIT
Repository
github
Last release
1 year ago

AMINIQ

Another asynchronous mini request client for Node.js with 0 dependencies.

Install

npm install aminiq

Mini GET Example

const request = await aminiq("http://localhost:80/")

console.log(request.data)
console.log(request.response)

Example GET

import {aminiq} from "aminiq"

(async ()=>{
   // use object....
   let ip = await aminiq({
      hostname: "ipinfo.io",
      path: "/ip",
      method: "GET",
      port: 443,
      fileName: "",
      download: false,
      https: true
   })

   // ...or just a string
   let ip2 = await aminiq("https://ipinfo.io/ip")

   console.log(ip.data)
   console.log(ip2.data)
})()

Example POST

aminiq({
   // options
   download: false,
   fileName: "",
   hostname: this.hostname,
   https: true,
   method: this.method,
   path: this.url,
   port: 443,
   headers: this.headers
   },{
      // post data
      "param1": "value",
      "param2": "value",
      "param3": "value"
   }
})

Notes

  • Post requests only work with application/x-www-form-urlencoded
0.5.2

1 year ago

0.5.1

1 year ago

0.4.2

2 years ago

0.4.1

2 years ago

0.3.1

3 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago