Icelain/jokeapi

Add context to downloading jokes

helgeolav opened this issue · 2 comments

I would like to make Fetch context aware. The simplest way to do so is to create a FetchWithContext that accepts a context as the first parameter. This will make sure that we don't break any existing code. Doing so will result in Fetch calling FetchWithContext with context.Background().

Is this acceptable?

Thanks for the suggestion. It is a good idea to add a fetch method with context. PRs are always welcome nonetheless I'll add it by today most likely.

Done with #26