set user agent header only if non-empty
pass nil to http.NewRequest if body is nil