Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Add configurable http client factory (fixes #120) #121

Merged
merged 1 commit into from
Nov 15, 2016

Conversation

ferhatelmas
Copy link
Contributor

@ferhatelmas ferhatelmas commented Nov 11, 2016

  • new http client factory ready to install/override default http(s)
  • mv GitUploadPackServiceFactory to clients.common pkg
  • rename http.HTTPError to http.Err
  • rename http.HTTPAuthMethod to http.AuthMethod
  • add doc and examples/ usage
  • general improvements:
    • update install link in readme to v4 (example are already pointing v4)
    • fix indentation in package doc (styling for godoc.org)
    • use http.Status constants instead of integers
    • close leaked response body
    • rm named returns which stutter in doc
    • fix one format string
    • rm unnecessary if checks
    • documentation fixes

@ferhatelmas ferhatelmas force-pushed the configurable-http-client branch from 9750213 to e75f179 Compare November 11, 2016 02:57
@ferhatelmas ferhatelmas changed the title Add configurable http client factory Add configurable http client factory (fixes #120) Nov 11, 2016
@ferhatelmas ferhatelmas force-pushed the configurable-http-client branch from e75f179 to 9a4e2cf Compare November 11, 2016 03:08
@mcuadros
Copy link
Contributor

mcuadros commented Nov 11, 2016

Can you provide an example in examples folder or maybe at package level? or even better both?
Looks nice I like the way of having your on client, the initial goal was that, but we forgot in the road :D @ferhatelmas

Copy link
Contributor

@alcortesm alcortesm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 👍

 * new http client factory ready to install/override default http(s)
 * mv GitUploadPackServiceFactory to clients.common pkg
 * rename http.HTTPError to http.Err
 * rename http.HTTPAuthMethod to http.AuthMethod
 * add doc and examples/ usage
 * general improvements:
   - update install link in readme to v4 (example are already pointing v4)
   - fix indentation in package doc (styling for godoc.org)
   - use http.Status constants instead of integers
   - close leaked response body
   - rm named returns which stutter in doc
   - fix one format string
   - rm unnecessary if checks
   - documentation fixes
@ferhatelmas ferhatelmas force-pushed the configurable-http-client branch from 9a4e2cf to eafea42 Compare November 14, 2016 23:42
@ferhatelmas
Copy link
Contributor Author

ferhatelmas commented Nov 14, 2016

@mcuadros rebased and added examples (they don't do anything fancy but shows how client is customizable).

@mcuadros mcuadros merged commit e252d20 into src-d:master Nov 15, 2016
mcuadros pushed a commit that referenced this pull request Jan 31, 2017
* new http client factory ready to install/override default http(s)
 * mv GitUploadPackServiceFactory to clients.common pkg
 * rename http.HTTPError to http.Err
 * rename http.HTTPAuthMethod to http.AuthMethod
 * add doc and examples/ usage
 * general improvements:
   - update install link in readme to v4 (example are already pointing v4)
   - fix indentation in package doc (styling for godoc.org)
   - use http.Status constants instead of integers
   - close leaked response body
   - rm named returns which stutter in doc
   - fix one format string
   - rm unnecessary if checks
   - documentation fixes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants