Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Here's my question: How to create a post request using C++ and sockets?

It's being downvoted, but I don't know why. I thought I was asking a really straight forward question that does belong on stackoverflow

Update: I've updated the post with a screenshot, and I've rewritten the content.

share|improve this question

My guess would be that downvoters feel that the question is "unclear" or perhaps "not useful". You've shown research effort, so it's not the absence of that that's drawing downvotes. Also, the title and body seem to be somewhat at odds: are you trying to work out how to make your own requests, or trying to understand how a browser works out what it should request? Here is a possible rewrite for the latter case, which the question body suggests is what you want:

(new title) What information does a browser use to construct the POST message sent when a button is clicked

(new body) When a button is clicked on a web page, and the browser sends a POST to the server, how does the browser determine what should be in that POST message? Are there instructions in the HTML of the page itself? I've used Wireshark to see what's sent over the wire when this happens add examples of public web pages if possible, and the data contained in the POSTs doesn't seem to be anything from the HTML content of the page itself.

share|improve this answer

I think the end of your question is what's drawing the downvotes:

Can anyone point me to some good resources to understand the technology behind it?

Questions on Stack Overflow are expected to be specific, clear, and have a right or wrong answer. Questions asking other people to provide you with good learning resources will almost always be closed, and likely downvoted.


It looks like the first part of your question was downvoted too:

Does the html website tell the browser what to send back after the user clicks something or what? I've been monitoring button presses with wireshark and the message it POST back doesn't seem to be in the html file...

I can't read the minds of the downvoters, but I think this question was a bit unclear, and showed little effort. I'm guessing writing this question a little more clearly, with more information, might have helped. Something like:

I'm looking at the post packets in WireShark that come over after I click a submit button in my form, but I don't understand how certain parts are generated based on the html in my form.

Then provide a screenshot from WireShark, the specific piece of the packet your confused about, the html from your form, etc.

share|improve this answer
The OP also got downvotes before that was added. – Matt Fenwick Feb 28 '12 at 17:04
I'll do the screenshot idea – purepureluck Feb 28 '12 at 17:34

Even after the edits, the question is still a bit of a mess. I suggest you split the question into multiple parts, as you seem to be asking several questions here.

  • What is required in a minimal POST request?
  • What does the fkey field mean?

Also, the title and tags don't match the question. The current title is "How to create a POST request using C++ and sockets?", but your question text is about HTTP, and there is no mention of C++ or sockets programming. If you have a question about using sockets in C++, perhaps that should also be a separate question.

In general, it is a good idea to try to keep questions specific to one issue at a time. That way, it is more likely to be useful for other people later.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .