Giter Site home page Giter Site logo

Comments (3)

davidkarlsen avatar davidkarlsen commented on May 31, 2024

Seems like I can hook in with WithClientMiddleware - can I return my own configured transport from this function?

from go-githubapp.

bluekeyes avatar bluekeyes commented on May 31, 2024

This is not currently supported (other than via system wide mechanisms like SSL_CERT_FILE and SSL_CERT_DIR), but I agree that it makes sense. In #92, we discussed adding a WithHTTPClient option, but ended up not needing it for the feature there. This seems like a good justification for adding one (or a more limited WithTLSConfig.)

While you could maybe work around this using WithClientMiddleware, you'll have to be careful to still delegate to the incoming http.RoundTripper. If you return your own configured transport and ignore the input, you'll remove the GitHub authentication and other helpers provided by this library.

I might have some time today to add the mentioned option function.

from go-githubapp.

davidkarlsen avatar davidkarlsen commented on May 31, 2024

This is not currently supported (other than via system wide mechanisms like SSL_CERT_FILE and SSL_CERT_DIR), but I agree that it makes sense. In #92, we discussed adding a WithHTTPClient option, but ended up not needing it for the feature there. This seems like a good justification for adding one (or a more limited WithTLSConfig.)

withTlsConfig would suffice and makes sense, it also leaves things better encapsulated than messing around and the comms-level which feels a bit low.

While you could maybe work around this using WithClientMiddleware, you'll have to be careful to still delegate to the incoming http.RoundTripper. If you return your own configured transport and ignore the input, you'll remove the GitHub authentication and other helpers provided by this library.

I might have some time today to add the mentioned option function.

That would be awesome and highly appreciated.

from go-githubapp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.