gpt4 book ai didi

rest - 在 TRESTClient 中添加 CustomHeader

转载 作者:行者123 更新时间:2023-12-03 15:47:31 26 4
gpt4 key购买 nike

我需要在 RestClient 中添加 CustomHeader 来添加 apikey。

在我的代码中我使用(FRESTClient 是 TRESTClient)

FRESTClient.SetHTTPHeader('X-XXX-ApiKey', 'fdfd121231212fds');

但是当我在 fiddler 上看到它时,它没有在我的 http header 中设置。有什么方法可以做到这一点?

最佳答案

您尝试过“添加参数”吗?

FRestClient.AddParameter('<Name>', '<Value>', TRESTRequestParameterKind.pkHTTPHEADER);

http://docwiki.embarcadero.com/Libraries/Rio/en/REST.Client.TCustomRESTClient.AddParameter

关于rest - 在 TRESTClient 中添加 CustomHeader,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55059595/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com