是否可以在URL本身中传递HTTP标头? [英] Is it possible to pass HTTP headers in the URL itself?

查看:106
本文介绍了是否可以在URL本身中传递HTTP标头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如:如果我想在网址本身中将 Content-Type 传递为 application / json ,我会这样做吗?

For example: if i wanted to pass Content-Type as application/json in the url itself, how would I do that?

我确实知道Postman,但还没有用太多。我想知道我是否可以从chrome本身做我需要的,而不需要使用POSTMAN。

I do know about Postman, but have not used it much. I was wondering if I could just do what I need from chrome itself, without needing to use POSTMAN.

推荐答案

不,你不能。 HTTP标准无法做到这一点。

No, you can't. HTTP standard has no way to do that.

但您可以通过bookmarklet机制使用地址栏中的标题来运行带有ajax请求的JS。

But you can run JS with ajax request with you headers from address bar via bookmarklets mechanism.

https://en.wikipedia.org/wiki/Bookmarklet

可以在Google Chrome设置面板中的地址栏(bookmarklet)中运行Javascript吗?

这篇关于是否可以在URL本身中传递HTTP标头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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