473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to set the ContentEncoding of the HTTPWebRequest object

Has anyone been able or is having trouble with setting the Content-Encoding
to a value in the headers collection of an HTTPWebRequest object.

I am trying to post a RosettaNet message to a trading partner that is using
webMethods server. The message gets to their server just fine but it is not
processing. They are telling me that the $contentEncoding has a value of
NULL. They are telling me that this is part of the Header information. I
have looked up the header property info on MSDN but I don't see anything
mentioned of setting the ContentEncoding.

Any one have suggestions.

Thanks,

Paul
Jun 23 '06 #1
1 3220
You will have to add this header in the collection of headers.

some thing like..

obRequest.Headers.Add("Conent-Encoding", "gzip");

You can see an example in this article. This sets "Accepts encoding" header.

http://www.netomatix.com/Development...tEncoding.aspx
"Paul Phillips" <Pa**********@discussions.microsoft.com> wrote in message
news:03**********************************@microsof t.com...
Has anyone been able or is having trouble with setting the
Content-Encoding
to a value in the headers collection of an HTTPWebRequest object.

I am trying to post a RosettaNet message to a trading partner that is
using
webMethods server. The message gets to their server just fine but it is
not
processing. They are telling me that the $contentEncoding has a value of
NULL. They are telling me that this is part of the Header information. I
have looked up the header property info on MSDN but I don't see anything
mentioned of setting the ContentEncoding.

Any one have suggestions.

Thanks,

Paul

Jun 23 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Dan Battagin | last post by:
Is there a known bug with the interaction between the HttpWebRequest and the ThreadPool? I current spawn several HttpWebRequest's using BeginGetResponse, and they work for a while, using worker...
16
by: thomas peter | last post by:
I am building a precache engine... one that request over 100 pages on an remote server to cache them remotely... can i use the HttpWebRequest and WebResponse classes for this? or must i use the...
6
by: Calvin Lai | last post by:
Does anyone know the difference and usage of them? Great thanks!
8
by: Ricky K. Rasmussen | last post by:
Hello NG, I'm having some encoding trouble using my own RequestHandler: Since the RequestHandler must be able to serve content with diffrent encoding, I set the Response.Charset and...
16
by: Cheung, Jeffrey Jing-Yen | last post by:
I have a windows form application that generates a request, downloads an image, and waits the user to enter in login info. Unfortunately, this image is dynamic and based on session data. I have...
3
by: JansenH | last post by:
We have implemented a 'HTTP Post' client in C# that posts Xml documents to a webserver. This is working fine if the post rate is one post for every 20 seconds. But if the post rate is increased to...
0
by: dattaforit | last post by:
I am using VC++ .Net (2003). In my application i create a HttpWebRequest object, add the method and header to the request. An now try to get the response. I get the response. to get the response i...
0
by: joshblair | last post by:
Hello, I am trying to post XML documents to a third party using the HttpWebRequest. This URL uses HTTPS (SSL) but I don't have a client certificate to deal with. Apparently they are using...
2
by: =?Utf-8?B?TGFycnlLdXBlcm1hbg==?= | last post by:
Our WebDev team seems to have found a problem that exposes a bug in .NET 2.0. This problem can be shown when trying to access a WebService using SSL and through a proxy server after using the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.