Skip to content

Conversation

@akhileshthite
Copy link
Contributor

Copy link
Member

@RangerMauve RangerMauve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd strongly prefer keeping the formdata method for both protocols. Is there a reason this needs to be changed?

Also we'd need to change the associated tutorial

@akhileshthite
Copy link
Contributor Author

I'd strongly prefer keeping the formdata method for both protocols. Is there a reason this needs to be changed?

Also we'd need to change the associated tutorial

Yeah, that makes sense. We will have to update the other docs as well.

I was getting TypeError: Cannot read properties of undefined (reading 'toLowerCase') at Busboy. error (p2plabsxyz/peersky-browser#40)

@RangerMauve
Copy link
Member

Maybe it'd be better to use the Request/FormData API that hypercore-fetch uses instead of busboy? This is how I convert the protocol handler to a Request object: https://github.com/AgregoreWeb/agregore-browser/blob/master/app/protocols/fetch-to-handler.js#L75

Note that the fetch() API just passes those parameters to the Request constructor: https://github.com/RangerMauve/make-fetch/blob/master/index.js#L10

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