How to use Chttp with post method

Posted on 2000-01-10
Medium Priority
Last Modified: 2013-11-20
I want to use the HTTP POST method with the mfc CHttp class.I m using HTTP_VERB_POST in opwnrequest . All things are going in proper way. But I don't undeerstand how should I send the parameters to cgi script.
I tried it with szHeader with AddRequestHeaders and SendRequest
But it didn't work
I need the correct format that I should send  !!!!
Question by:xpash
LVL 23

Accepted Solution

chensu earned 800 total points
ID: 2339291
HOWTO: Simulate a Form POST Request Using WinInet
LVL 11

Expert Comment

ID: 2339514
The correct format, and the list of headers you need, is going to be dependent on exactly what's running on the server to answer the request.

You should use a network sniffer, or WININET's trace mode, to see what IE sends when you interact with the target page manually. Then, you have a perfect idea of what you need to send in your programmatic POST request.

..B ekiM

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
From store locators to asset tracking and route optimization, learn how leading companies are using Google Maps APIs throughout the customer journey to increase checkout conversions, boost user engagement, and optimize order fulfillment. Powered …

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question