Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3853480
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:28:31+00:00 2026-05-19T17:28:31+00:00

I need to send certain data to the server in a .zip archive, over

  • 0

I need to send certain data to the server in a .zip archive, over HTTP POST request, MIME encoded. I take it that means only that I need to specify MIME type in a request header. But I’m confused as to what should I put in request’s body. So far I can see two ways to do it:

  1. Usually, as I take it (sorry, I’m not a web coder, so kinda lame with HTTP), POST request body consists of pairs parameter_name=some+data divided by ‘&’. Should I do it the same way and write contents of my file in base64 in one of parameters? That would also let me provide supplemental parameters.

  2. Or should I just fill POST body with contents of my file (in base64, right?)? If so, is there any way to provide additional info about the file?

Is only one of theese ways acceptable or are both? If so, what would be the best practice?

Also, code sample in C++ for Qt would be very-very much appreciated, but totally not necessary 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T17:28:32+00:00Added an answer on May 19, 2026 at 5:28 pm

    The whole key=value body in POST requests is just for when you are sending form-data to your server. If you want to POST only the contents of a .zip file you can just send that as the body of your POST, no need to set it up like a form post as you describe. You can set the following headers in the request:

    Content-Type: application/zip
    Content-Disposition: attachment; filename=myzip.zip
    

    You don’t even necessarily have to base64 encode the body, although you should if that’s what your server is expecting.

    The Content-Disposition is the thing you need to describe more about your file upload. You can find some details about it here:

    http://en.wikipedia.org/wiki/MIME#Content-Disposition

    and here

    http://www.ietf.org/rfc/rfc2183.txt

    At the server end, you just need to write some code which will get the response body in its entirity (which is straightforward, although YMMV depending on language and framework), and handle it however you want.

    For a real world example, you might find it useful to look at, say, AtomPub for how this is done:

    http://bitworking.org/projects/atom/rfc5023.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to send and receive data over serial connections (RS-232 and RS-422). How
I need to send a very specific (non-standard) string to an FTP server: dir
I need to send PUT and DELETE along with POST, GET to a REST
I need to send a CSV file in HTTP response. How can I set
I need to send data from my iPhone application to my webserver, and back.
I need to send click information on my website to a third party server
I need a user to navigate to a certain page that has a certain
I need to maintain a connection between a server and multiple clients so that
I need to send email in asp.net mvc 2 asynchronously after a certain action
I need to send hundreds of newsletters, but would like to check first if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.