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

问题描述

我正在使用一个API,该API提供了一个名为 token 的HTTP标头,其值为 12abc3 ,而我的网址是 https://example.com/view/quote .有没有一种方法可以将标头添加为url中的参数,以便直接在浏览器的地址栏中键入标头,而不用使用 cURL Hurl.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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 17:32