gpt4 book ai didi

javascript - 是否可以使用 XHR ("Ajax"请求发送自定义 header )?

转载 作者:数据小太阳 更新时间:2023-10-29 04:33:03 30 4
gpt4 key购买 nike

我正在使用一个 API,它需要额外的安全信息作为 header 中的元信息与 HTTP 请求一起发送。是否可以在 XMLHttpRequest 中设置它们?

最佳答案

是的,参见 "The setRequestHeader() method" 2012 年 12 月 6 日的当前 XMLHttpRequest 工作草案。

关于javascript - 是否可以使用 XHR ("Ajax"请求发送自定义 header )?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1180048/

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