API

Mql(<url>, [options], [httpoptions])

url

required
Type: <string>
The target URL for getting content.

options

Type: <object>
You can pass any API Parameters from Microlink API as an option.

Additionally, you can configure:
apiKey
Type: <string>
The API Key used for authenticating your requests as x-api-key header.
When the apiKey is provided, the as endpoint will be used.
cache
Type: <object>
Note: this feature is only available for Node.js.
When you pass an object that follows Map API, you can enable serve response from your storage cache in order to save API if they have been previously done.
Caching feature is only available in the Node.js bundle.
Consider to pass for supporting
See to know more.
retry
Type: <number>
Default: 2
Defines how many retries can be done before an API call is considered failed.
See to know more.

httpOptions

Type: <object>
Any additional option will be passed to or that are the internal HTTP clients used for Node.js and browser respectively.
That's necessary for some user workflow, e.g., passing authentication headers without exposing credentials.

mql.stream(<url>, [options], [httpoptions])

Returns a instead of a Promise.

mql.buffer(<url>, [options], [httpoptions])

Returns a instead of a Promise.