February 10th, 2009, 05:43 AM
How to send HTTP POST query string consist of & and NULL character
I want to send HTTP POST message to my web server method. But my query string consist of '&' and NULL.
I am using wininet classes method such as,
My query string for the POST request is mentioned below.
POST /Service/Service.asmx/CheckValidity HTTP/1.1
Test1=<data including '&' and NULL>
Body part like this "Ab1Cde4&adjdkNULLdfa!#A
When I send this request to web server, web server does not get the same string rather the string gets truncated.
I am testing this with a web server build locally using ASP.NET
Please help me how I can solve this
February 23rd, 2009, 07:27 AM
Re: How to send HTTP POST query string consist of & and NULL character
since you have specified that the string is url encoded, you need to make sure that it is.
& should be sent as & and you can send null as %00. All spaces should be replaced with a plus sign: +
Your example string should look like:
"The making of software, like the making of sausages, should never be watched."
- .NET Coding/Architecture
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.