If you call the SendDocument yourself, you can use this overload version

procedure SendDocument(SendType: THttpSendType; const CustomHeaders: string); overload; virtual; { V7.29 }

If not, you can override it and pass your custom header in the CustomHeaders parameter, calling the inherited SendDocument. This way you don't need to duplicate that function code.

Or you can use the PersistentHeader property. Just fill it with your custom headers, before the send, and clear after done if additional sends don't need it anymore.

Hello,

I need to add for certain mime content types special headers to the HTTP
header. As an example for static resources the "Expires" or "Cache-Control"
headers.

Unfortunatly I haven't found a way to do this without overriding (and
duplicating) the SendDocument function. Did I miss something obvious or is
there no way to add custom headers depending on the mime content type?

Thanks
Lars

--
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


--
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

Reply via email to