ping

Type:
<boolean> | <object>

Default: true
It ensures that any URL present on the response payload is publicly reachable.
  • CLI
  • JavaScript
  • Shell
  • Python
  • Ruby
const mql = require('@microlink/mql')

const { status, data } = await mql('https://microlink.io', { ping: true })

mql.render(data)
By default, any URL present on the response payload hasve been verified as reachable.
You can disable this behavior in a partial way:
  • CLI
  • JavaScript
  • Shell
  • Python
  • Ruby
const mql = require('@microlink/mql')

const { status, data } = await mql('https://microlink.io', {
  ping: { audio: false }
})

mql.render(data)
Avoid to ping `audio` URLs extracted.
or in a total way:
  • CLI
  • JavaScript
  • Shell
  • Python
  • Ruby
const mql = require('@microlink/mql')

const { status, data } = await mql('https://microlink.io', { ping: false })

mql.render(data)
Keep the raw data URLs extracted, no pinging them.
Keep in mind if you decide to disable this behavior in a partial or total way you should handle non reachable URLs from your side.