Comments (7)
Hey @talentlessguy I've stumbled on this issue and was wandering if it's still viable to have a go at it?
If so, can you suggest any pointers about the desired robustness of the solution? form data can be quite complex if I were to follow this:
https://www.w3.org/TR/html401/interact/forms.html#h-17.13.3
from milliparsec.
@ilanru easiest solution is just being able to parse text fields. if files are doable without introducing new dependencies, even better.
from milliparsec.
Oh that was quick
Alright, I'll start with text fields and go from there, thanks
from milliparsec.
Well, sorry about the long delay, life got in the way.
I've drafted a small pr with the suggested changes:
#21
It was not very complex to extract the file fields, but I am not sure what is the proper response structure and how should the files be encoded as at the moment they are converted to simple strings inside the p function.
Here's an example response for files from the implementation, any suggestions would be appreciated:
"image": { "filename": "tumblr_2_250.gif", "value":"Content-Type: image/gif\r\n GIF89a���������D2#$" }
from milliparsec.
I would like formdata support too.
from milliparsec.
@Coachonko you could continue the efforts of @ilanru if you'd like and I'll review the PR
from milliparsec.
Well, sorry about the long delay, life got in the way.
I've drafted a small pr with the suggested changes:
#21It was not very complex to extract the file fields, but I am not sure what is the proper response structure and how should the files be encoded as at the moment they are converted to simple strings inside the p function.
Here's an example response for files from the implementation, any suggestions would be appreciated:
"image": { "filename": "tumblr_2_250.gif", "value":"Content-Type: image/gif\r\n GIF89a���������D2#$" }
Just encode the value to Uint8Array
from milliparsec.
Related Issues (13)
- Shows error if json body is empty HOT 5
- Always get 415 error HOT 14
- TypeScript - Load ESM HOT 2
- Add options to the JSON parser HOT 2
- No "main" field in package.json HOT 3
- shows undefined in http delete request HOT 7
- Hangs infinitely if body is empty HOT 1
- Form data returns as unfiltered string objects HOT 2
- Tinyhttp error in types HOT 2
- File upload support HOT 1
- Must use import to load ES Module HOT 15
- Add CommonJS support HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from milliparsec.