fix a couple bugs, provide http.Client wrapper