在正文中发送GET请求参数 [英] Sending GET request parameters in body

查看:106
本文介绍了在正文中发送GET请求参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 API ,它可以接受许多参数。
传递参数的值将超过 URL标头的长度。

I have an API which accepts many parameters. Passing the values of the parameters will exceed the length of the URL Header.

我正在使用邮递员客户端在正文中传递参数,但这不能提出任何有关如何实现此功能的想法。

I am using Postman client to pass the parameters in the body but this is not working any ideas on how to make this work.

API 接受许多参数,因为后端是旧版,并作为 API 公开

The API accepts many parameters because the backend is legacy and is exposed as an API by a service bus.

推荐答案

旧版本的Postman不允许您发送 body 带有 get 请求的数据。

Older versions of Postman didn't allow you to send body data with get request.

但是,如果您的服务器将数据作为URL参数接收,您将赢得

Yet, if your server receives data as URL parameters you won't be able just to change the way of sending them and include them to the body (server won't accept them).

因此,如果参数的长度确实是正确的,则不能更改它们的发送方式并将其包含到正文中(服务器不会接受它们)。如此之大,服务器确实可以从主体而不是从参数接收相同的数据,那么Postman并不是您可以使用的工具(也许cURL适合您)。

So if the length of parameters is indeed so big and the server indeed can receive the same data from body instead of from parameters then the Postman is just not the tool that you can use (maybe cURL is for you).

如果您的服务器仅允许将数据作为URL参数发送,并且它们是如此之长(超过2000个字符在不同浏览器中URL的最大长度是多少?)那么我认为您没有机会测试此API。

If your server allows to send data only as URL parameters and they are so long (more then 2000 chars What is the maximum length of a URL in different browsers?) then I think you have no chances to test this API.

更新:新版7.20.1现在允许发送带有GET请求的正文

UPDATE: new Version 7.20.1 now allows to send Body with GET request

这篇关于在正文中发送GET请求参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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