Hi, posted this a while ago, Feb 21st, 2011, and it had no response. Thought I'd bring it up again, as maybe I'm missing something and this is possible some other easier way? (though it doesn't seem like from looking at the code, there's nothing to allow custom headers besides the triggered event)
Original message: (lines won't match with current version) I made a small modification to OverbyteIcsHttpProt, maybe it can be sorted for the next version. OverbyteIcsHttpProt : I made a small change to modify the headers before sending a request. I know there is an event for it, OnBeforeHeaderSend, however that's not quite handy. Usually you need add something to the header just before the call, so to use the event you would have to set a flag or something that adds the header only in case of certain calls.. like, let's say, you are gonna make a few gets or posts, but only need to modify the header for one of them, it's not really convenient then to use the event if you are using the same socket object for all the calls. Isn't it more handy if you can just modify it before your call? So I changed the following: 589: FExtraSendHeader : String; 914: property ExtraSendHeader : String read FExtraSendHeader write FExtraSendHeader; 2405: // 2011, before TriggerBeforeHeaderSend if FExtraSendHeader <> '' then begin Headers.Add(FExtraSendHeader); FExtraSendHeader := ''; end; -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be