[Mono-dev] Authentication with WebRequest?

knocte knocte at gmail.com
Sat Aug 27 11:16:01 EDT 2005


Kornél Pál escribió:
> If you don't want to do any special then you can simply use
> HttpWebRequest.Credentials to sepcify user name and password.
>
> Kornél
>
> ----- Original Message -----
> From: "Kornél Pál" <kornelpal at hotmail.com>
> To: "knocte" <knocte at gmail.com>; <mono-devel-list at lists.ximian.com>
> Sent: Friday, August 26, 2005 11:11 PM
> Subject: Re: [Mono-dev] Authentication with WebRequest?
>
>
>> You can use HttpWebRequest.Headers to specify HTTP headers.
>>
>> Note that you are actually talking about HTTP headers not TCP 
>> headers. TCP
>> is a lower level layer than HTTP that you cannot manipulate using 
>> sockets.
>>
>> If you want to send the whole request as raw data you have to use 
>> sockets
>> but you will have to process the response as well because you will 
>> get it
>> as
>> raw data. If you need the functionality of HTTP you can use 
>> HttpWebRequest
>> as it exposes a lot of options through properties.
>>
>> Kornél

Thanks Kornel I will try with HttpWebRequest. You are right about my 
TCP/HTTP confusion. I wanted to know just that, how to do this without 
dealing with sockets. BTW, what's the difference between 
System.Net.WebRequest and HttpWebRequest?

Thanks again,

    Andrew

-- 




More information about the Mono-devel-list mailing list