DEV Community

Understanding HTML Form Encoding: URL Encoded and Multipart Forms

Dinesh Balaji on August 11, 2018

The other day I was trying to write a REST endpoint in Go, which uploads the contents of a form submitted in a browser to another REST endpoint, in...
Collapse
 
backwardsdave1 profile image
David Klempfner •

Great post, well explained!
Btw minor grammar mistake: "Represents an URL encoded form". It should be "a URL". "An" is only used before nouns that start phonetically with a vowel (URL is pronounced "yew-aar-el").

Collapse
 
sidthesloth92 profile image
Dinesh Balaji •

Have made the edit, thanks.

Collapse
 
gabrieljm profile image
Gabriel José •

Great post! I've only one question about how can we get a file's content, without parsing the request body into a string. I've tried parsing it, got succeed but the result takes a too long time to complete.

Collapse
 
shubhambattoo profile image
Shubham Battoo •

Good read.

Collapse
 
sidthesloth92 profile image
Dinesh Balaji •

Thanks.. :)

Collapse
 
fonzane profile image
fonzane •

How do I make the POST-Request and its details visible in the chrome dev-tools? Whenever I submit the form, I only see the requests to the files that belong to the "page not found" page in the network tab of chrome.

How did you do it?

Collapse
 
davidchen0310 profile image
davidchen0310 •

It's comprehensive and I appreciate it, but I found some typos.

"Avoid using them as they meant for human understanding and for machines."
->
"Avoid using them as they meant for human understanding and not for machines."

Collapse
 
z2lai profile image
z2lai •

->
"Avoid using them as they are meant for human understanding and not for machines."

Collapse
 
sidthesloth92 profile image
Dinesh Balaji •

Have made the edit, thanks for pointing it out.

Collapse
 
nickolayl profile image
Nickolay Loshchinin • • Edited

Thanks for the article.
Avoid using them as they meant for human understanding and NOT for machines.
Is 'not' omitted?

Collapse
 
sidthesloth92 profile image
Dinesh Balaji •

Yep, I have made the change. Thanks.

Collapse
 
dance2die profile image
Sung M. Kim •

Thanks Dinesh for the post 🕺.

After using Form tags so many years, I've never paid attention to such small details.

Loved ❤️ how you laid out the article top to bottom.

Collapse
 
sidthesloth92 profile image
Dinesh Balaji •

Thank you .. :)

Collapse
 
heshiebee profile image
Heshie Brody •

Great Resource!

Collapse
 
haffjjj profile image
Jon •

great article :D..

Collapse
 
ogookafor profile image
Ogo Okafor •

You just saved a life. Thanks Dinesh!

Collapse
 
diglopes profile image
Diego Lopes •

You helped me a lot!

Collapse
 
sidthesloth92 profile image
Dinesh Balaji •

Happy to help.. :)

Collapse
 
harshilparmar profile image
Harshil Parmar • • Edited
Collapse
 
chezcoder profile image
ChezCoder •

Is the "Content-Type" header mandatory for POST requests? What about for GET requests?

Collapse
 
naman_pathak_7026f602b20e profile image
Naman Pathak •

Good One,
Helped me a lot man

Collapse
 
rickywchew profile image
Ricky Chew •

Great post, well explained!

Collapse
 
tracygjg profile image
Tracy Gilmore •

Hi Ricky and welcome to the Dev.to community.
Please take a moment to write a brief bio as it really helps people reading your comments to understand your perspective.
Kind regards Tracy