使用代理管理器编写请求

Composing a request using Proxy manager

我正在为一个项目做概念验证。 我有一个 GPS 供应商。我需要向他们的服务器发出 GET 请求,我的任务是迈出第一步并获取一些数据。 他们给出的指令是使用 c-URL 给出的。如何基于它发出 fiddler 请求?

c-URL:

curl -H 'Accept: application/json' -u 653638dc733afce75130303fe6e6010f63768af0:X http://XXXXX.XXXXXXXX.XXX/api/v2/:api_endpoint curl -H 'Accept: application/json' -H 'Content-type: application/json' -u 653638dc733afce75130303fe6e6010f63768af0:X http://XXXXX.XXXXXXX.XX/api/v2/:api_endpoint -d '{JSON data}'

我正在使用 Windows,如果我将其粘贴到 GitBash(具有 c-URL),它会起作用。我需要将其设为 AJAX 请求。我正在使用 Fiddler 让它工作,然后我可以让 AJAX 变得简单。

这是供应商的小指令:

Authentication is managed using HTTP authentication. Every request must include the Authorization HTTP header. Use your API token as the username, and X (or some otherwise bogus text) as the password (only the API token is used for authenticating API requests) Token can be generated and revocated from the web interface of the WebServices.

如何基于此数据构建 GET header

这是我目前所做的,不知道是否正确:

User-Agent: Fiddler Host: XXXXXX.XXXXXX.XXX Accept: application/json Content-type: application/json -u 653638dc733afce75130303fe6e6010f63768af0: X: rwerwe