I need to add CustomHeader in my restclient to add an apikey.
In my code I use (FRESTClient is TRESTClient)
FRESTClient.SetHTTPHeader('X-XXX-ApiKey', 'fdfd121231212fds');
but it is not set in my http header when I see it on fiddler. What is the way to make this ?
Have you tried 'AddParameter'?
FRestClient.AddParameter('<Name>', '<Value>', TRESTRequestParameterKind.pkHTTPHEADER);
http://docwiki.embarcadero.com/Libraries/Rio/en/REST.Client.TCustomRESTClient.AddParameter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With