Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protocol v2: Docker request path in HTTP request #46

Open
robhaswell opened this issue Feb 2, 2015 · 3 comments
Open

protocol v2: Docker request path in HTTP request #46

robhaswell opened this issue Feb 2, 2015 · 3 comments

Comments

@robhaswell
Copy link
Contributor

@progrium has proposed (via email) removing the Docker request path from the JSON encoded body, and encoding it in the HTTP request path. This would mean that a request for GET /v16/containers/json to Docker would be proxied to an Adapter defined a http://adapter/ at the URI http://adapter/v16/containers/json.

Note that currently the method would always be POST, as the body encodes the details of the request.

While there are no technical arguments for this request, there is a good practical argument. The process of parsing a request path and passing it off to a handler function, known as HTTP routing, is a solved problem. Being able to take advantage of current HTTP routers would make plugin authorship easier.

@binocarlos
Copy link
Contributor

👍 - I very much agree with this sentence:

"Being able to take advantage of current HTTP routers would make plugin authorship easier."

@robhaswell
Copy link
Contributor Author

@binocarlos your use-case was in mind when you wrote that :) I'm not yet ready to +1 this, I am on the fence and would enjoy some more argument. @progrium?

@progrium
Copy link

progrium commented Feb 3, 2015

Again, no technical reason other than one is clearly simpler and when there are two options that both solve a problem, you should always pick the simpler one. So it not only makes the author experience easier, and makes the spec and implementation slightly simpler, but it further reduces the need for structured meta-data in the body, which will further simplify the spec and has its own technical merits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants