如何将 HTTP 标头添加到 URL [英] How to add HTTP header to URL

查看:50
本文介绍了如何将 HTTP 标头添加到 URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个 API,它提供了一个名为 token 的 HTTP 标头,其值为 12abc3,我的网址是 https://example.com/view/quote.有没有一种方法可以将标题作为参数添加到 url 中,以便我可以直接在浏览器的地址栏中键入它,而不是使用 cURLHurl.it>??

I'm working with an API which provides a HTTP header called token with value 12abc3 and my url is https://example.com/view/quote. Is there a way by which I can add the header as a parameter in the url so that I can type it directly on my browser's address bar instead of using cURL orHurl.it??

推荐答案

我认为能够做到这一点的唯一方法是编写一个小型 HTTP 代理,该代理采用特殊格式的 URL 并从 URL 中提取标头值并为您重新发出请求.我不知道有任何服务可以自动为您执行此操作.

The only way I can imagine being able to do this would be to write a small HTTP proxy that takes a specially formatted URL and extracts header values out of the URL and re-issues the request for you. I'm not aware of any service to do this automatically for you.

这篇关于如何将 HTTP 标头添加到 URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆