xinsnake / go-http-digest-auth-client

Golang Http Digest Authentication Client
BSD 2-Clause "Simplified" License
41 stars 68 forks source link

parameter for timeout #5

Closed dh1tw closed 7 years ago

dh1tw commented 7 years ago

Hi @xinsnake, thanks for this neat library! I'm using it to grab some pictures from an IP Camera which requires the digest based authentication.

The only wish I have is to be able to set a shorter timeout. Currently the timeout is hard coded to 30 seconds.

Maybe an implementation using the context package would make sense. Context.WithTimeout could be an adequate solution.

xinsnake commented 7 years ago

Hi @dh1tw Thanks for your suggestion. I'll be having a look.

xinsnake commented 7 years ago

After looking at the forks people have different ways of implementing the options needed and none of them really stands out. Leaving this as it is and if this needs to be standardised we can reopen this and think about how can we solve them.