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

API / driver-http #315

Open
guillaumecrespel opened this issue Jan 31, 2019 · 5 comments
Open

API / driver-http #315

guillaumecrespel opened this issue Jan 31, 2019 · 5 comments
Assignees

Comments

@guillaumecrespel
Copy link
Member

guillaumecrespel commented Jan 31, 2019

change API of http driver :
http(context)[method](url, body, options) =>

  • if first parameter is a string : http(context).head(url, body, options)
  • if first parameter is an object : http(context).head({ url, body, options })

what do you think @fabienjuif ?

@fabienjuif
Copy link
Member

what about

  • get(url, options)
  • head(url, options)
  • ???(url, options)
  • post(url, body, options)
  • put(url, body, options)
  • etc ?

Or

  • http(context).withOptions(options).get(url<, body>)

@guillaumecrespel
Copy link
Member Author

the first solution it's not consistent :/ You don't have the same API to all method, and I don't like this.
the second is ugly no ?

@fabienjuif
Copy link
Member

Why do you want the object version at first place?

@guillaumecrespel
Copy link
Member Author

because it's generic and not change API ?

@fabienjuif
Copy link
Member

  • Why did you need this change?
  • Why the current API is not good enough for your need?

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

2 participants