Skip to content

Conversation

@krisbitney
Copy link
Contributor

@krisbitney krisbitney commented May 26, 2023

This PR adds a standard interface for an HTTP client. Please carefully review this interface and provide feedback!

Based on feedback that suggested standard library interfaces should be low-level. The proposed new interface is simpler than the interface currently in production. Significant changes include:

  • removed get and post methods in favor of a single request method
  • removed formData property from request. Form-data is now expected to be converted to string format before being sent.
  • removed urlParams and responseType from request
  • moved url and method to Request

Removed features, like responseType, can be implemented in a supplementary wrapper with a high-level interface. This can be done in the future either by the community or by Polywrap.

Closes https://github.com/polywrap/std/issues/4

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