Code Monkey home page Code Monkey logo

exp-httpclient's Introduction

Rethinking Go's HTTP client

This repository explores redesigning the API for the Go language's net/http Client and Transport.

FAQ

What's wrong with Go's HTTP client?

See the list of problems.

What about the Server?

This repo does not aim to address the server side of the net/http package. The server half in better shape than the client, and it's also easier to fix the client half without fragmenting the ecosystem. Changing the Server interface needs to be done much more carefully.

But even long term, it's almost certainly best for the client and server to live in separate packages. They might share some types & code from shared HTTP package(s).

Who's leading this effort?

Brad Fitzpatrick, @bradfitz. I've owned the net/http package for over 8 years and have plenty of gripes about it. I welcome all input. If we're going to finally change it, we should get it right, so there's no need to rush this process.

What's the plan?

Roughly:

  • Iterate on the API & godoc repeatedly until it looks right (with a fake, panic("TODO")-only implementation)
  • Discuss, revise.
  • Add a temporary implementation (likely inefficient), wrapping the existing net/http Client.
  • Port code to use it. See if we're still happy.
  • Discuss, revise.
  • Copy net/http and golang.org/x/net/http2 code into httpclient (likely several packages).
  • Benchmark, tune, revise API as needed.
  • Redo the "legacy" net/http and golang.org/x/net/http2 client APIs as wrappers around httpclient

Of course, this is all up for debate.

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.