need callback for each internal requests
how many internally call http requests? if file exists one head request, is it only this call? or have another? i need to get header ("auth") of the head request and set new one on next request.
any apis to achieve this?
This is currently not possible but something I should consider. Alternatively, you can perform the head request yourself first and then populate a grab request.
how to disable internal additional head requests?
You can disable grab's HEAD requests by setting Request.NoResume = true. Naturally, this will also prevent grab from being able to resume incomplete downloads.
If you want both features, you will need three request:
- first you send a
HEADrequest to get theauthheader - second, grab will send
HEADrequest to determine file size, resume-ability, etc. - last, grab will send
GETrequest to download the file
If your program is not particularly latency sensitive, this additional HEAD request seem inexpensive to me.