Skip to content

HTTPOptions body type does not allow FormData #90

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

Closed
achingbrain opened this issue Jan 30, 2021 · 2 comments
Closed

HTTPOptions body type does not allow FormData #90

achingbrain opened this issue Jan 30, 2021 · 2 comments
Assignees
Labels
need/analysis Needs further analysis before proceeding status/ready Ready to be worked

Comments

@achingbrain
Copy link
Member

achingbrain commented Jan 30, 2021

The HTTPOptions type extends FetchOptions which extends RequestInit from electron-fetch, which has a body type of Stream | string | Blob | Buffer | null which does not include FormData.

In js-IPFS we transform multipart requests into FormData objects in the browser, which TS then says cannot be used with the http module exported by this module, since the types in electron-fetch say FormData is not a supported body type.

@achingbrain achingbrain added the need/triage Needs initial labeling and prioritization label Jan 30, 2021
@lidel lidel removed the need/triage Needs initial labeling and prioritization label Apr 26, 2021
@BigLep BigLep added the status/ready Ready to be worked label Apr 26, 2021
@lidel
Copy link
Member

lidel commented Apr 26, 2021

next steps are either:

  • (a) PR electron-fetch
  • (b) use types from something else
  • (c) create our own types for fetch

(b) seems to be preferred way to tackle this

@lidel lidel added the need/analysis Needs further analysis before proceeding label May 10, 2021
@achingbrain
Copy link
Member Author

Fixed by #129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/analysis Needs further analysis before proceeding status/ready Ready to be worked
Projects
No open projects
Archived in project
Development

No branches or pull requests

3 participants