# DownloadTask.onHeadersReceived(function callback)

Start from base library version 2.1.0. Please remaining backward compatible.

Listens on HTTP Response Header event, which will be earlier than the request completion event.

# Parameters

# function callback

The callback function for the HTTP Response Header event.

# Parameters

# Object res
Property Type Description
header Object HTTP Response Header returned by the developer server