DefaultClient: Extracted duplicated code into a method.
DefaultClient: Extracted user agent string to private member.