Skip to content

Releases: fastify/light-my-request

v3.4.1

28 Jun 13:58
Compare
Choose a tag to compare
  • Add Node 12 to Travis #46
  • Fix dep0066 #45

v3.4.0

15 Jun 12:26
Compare
Choose a tag to compare
  • Use path as alias of url - #43

v3.3.0

04 Apr 09:51
Compare
Choose a tag to compare

v3.2.0

07 Feb 23:53
Compare
Choose a tag to compare
  • Migrate to WHATWG URL #33

v3.1.0

03 Sep 10:23
Compare
Choose a tag to compare
  • Added body->payload aliases #28

v3.0.0

17 Aug 10:58
Compare
Choose a tag to compare
  • Updated readable-stream@3 #25 #26

v2.0.3

07 Jul 15:13
Compare
Choose a tag to compare
  • Force stream resume #24

v2.0.2

24 Apr 07:57
Compare
Choose a tag to compare
  • Allow onyl http.METHODS - #20

v2.0.1

11 Jan 22:21
Compare
Choose a tag to compare
  • Updated ajv to 6.0.0.

v2.0.0

07 Jan 12:16
Compare
Choose a tag to compare
  • Added error handling - #10 #11

v1

// callback
inject(dispatch, { method: 'get', url: '/' }, (res) => {
  console.log(res.payload)
})

// promises
inject(dispatch, { method: 'get', url: '/' })
  .then(res => console.log(res.payload))

// async-await
const res = await inject(dispatch, { method: 'get', url: '/' })
console.log(res.payload)

v2

// callback
inject(dispatch, { method: 'get', url: '/' }, (err, res) => {
  console.log(res.payload)
})

// promises
inject(dispatch, { method: 'get', url: '/' })
  .then(res => console.log(res.payload))
  .catch(console.log)

// async-await
try {
  const res = await inject(dispatch, { method: 'get', url: '/' })
  console.log(res.payload)
} catch (err) {
  console.log(err)
}