Skip to content

refactor(core): improve HTTP API, closes #1098#1237

Merged
lucasfernog merged 3 commits intodevfrom
refactor/improved-http-api
Feb 16, 2021
Merged

refactor(core): improve HTTP API, closes #1098#1237
lucasfernog merged 3 commits intodevfrom
refactor/improved-http-api

Conversation

@lucasfernog
Copy link
Member

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • New Binding Issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes. Issue #___
  • No

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

@lucasfernog lucasfernog requested a review from a team as a code owner February 15, 2021 03:48
@lucasfernog lucasfernog requested a review from a team February 15, 2021 03:48
@lucasfernog
Copy link
Member Author

@nklayman I'd love to hear your inputs on the API interface (file http.ts)

@nklayman
Copy link
Member

I think the createClient/dropClient adds some unnecessary complexity and could scare people into just using the webview fetch. Why is that necessary? If that is required, I think we should at least provide a request function that automatically creates and then drops the client.

@lucasfernog
Copy link
Member Author

I think the createClient/dropClient adds some unnecessary complexity and could scare people into just using the webview fetch. Why is that necessary? If that is required, I think we should at least provide a request function that automatically creates and then drops the client.

The Client adds some optimizations but yeah we should add a global default client.

@lucasfernog lucasfernog merged commit a7bc472 into dev Feb 16, 2021
@lucasfernog lucasfernog deleted the refactor/improved-http-api branch February 16, 2021 01:28
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

Successfully merging this pull request may close these issues.

2 participants