import mql from '@microlink/mql' const { data } = await mql('https://microlink.io', { ping: true })
ping
Type:
Default: true
<boolean> | <object>
Default: true
It ensures that any URL present on the response payload is publicly reachable.
By default, any URL present on the response payload hasve been verified as reachable.
You can disable this behavior in a partial way:
import mql from '@microlink/mql' const { data } = await mql('https://microlink.io', { ping: { audio: false } })
Avoid to ping `audio` URLs extracted.
or in a total way:
import mql from '@microlink/mql' const { data } = await mql('https://microlink.io', { ping: false })
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.