Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 18th, 2004, 08:29 AM
Registered User
 
Join Date: Jan 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to IgorT
Default Problem with wininet

Hi,
I am using wininet.dll API to send http requests. Everything working fine - I am able to send a request and receive a response, but I am unable to pass any parameters with the request.

Meaning :
POST /resource...
...headers... CRLF
CRLF
myParameter=value CRLF

the wininet API has a function HttpSendRequest (hande, headers, headersLength, data, dataLength)

for some reason the data does not arrive or not sent, however the CONTENT-LENGTH is added to headers.

Any suggestions ?
Thank you in advance
 
Old September 2nd, 2004, 10:20 AM
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try this:

char pHeader[] = "Content-Type: application/x-www-form-urlencoded\r\n";

HttpAddRequestHeaders( m_hData, pHeader, strlen( pHeader ), HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDREQ_FLAG_ADD );

before HttpSendRequest - this helped me, probably it will help you.






Similar Threads
Thread Thread Starter Forum Replies Last Post
WinINet - Choosing encryption algorithm tdaplyn Visual C++ 0 April 28th, 2006 06:48 PM
WinInet Regie Visual C++ 5 December 29th, 2005 01:21 AM
WinInet jain30 Visual C++ 0 December 1st, 2005 01:43 AM
Visual C++ wininet brwoodru Visual C++ 1 November 2nd, 2005 04:07 PM
Using WININET.DLL from .NET [email protected] ADO.NET 3 July 1st, 2003 11:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.