【问题标题】:How to copy HTTP headers from Charles to Postman如何将 HTTP 标头从 Charles 复制到 Postman
【发布时间】:2018-04-14 04:32:22
【问题描述】:

我在重新创建标题时遇到了问题,一切看起来都相同,但它只是不起作用。需要这些标头才能访问 Instagram API

我尝试使用 Charles 拦截来自移动设备的流量,它按预期工作,但我正在努力重新创建相同的标头。

网址是https://i.instagram.com/api/v1/feed/user/7499201770/reel_media/

标题是

:method: GET
:scheme: https
:path: /api/v1/feed/user/7499201770/reel_media/
:authority: i.instagram.com
content-type: application/json
authority: i.instagram.com
accept: */*
path: /api/v1/feed/user/7499201770/reel_media/
accept-language: en-IN;q=1.0
accept-encoding: gzip;q=1.0, compress;q=0.5
content-length: 2
user-agent: Instagram 10.29.0 (iPhone7,2; iPhone OS 9_3_3; en_US; en-US; scale=2.00; 750x1334) AppleWebKit/420+
referer: https://www.instagram.com/
x-ig-capabilities: 3w==
cookie: ds_user_id=6742557571; sessionid=IGSCf716eb61bf2a6d41f...

我尝试使用 Postman 来重新创建此请求,但每次我收到相同的错误“需要登录”。我应该如何粘贴这些标题?我看不懂

【问题讨论】:

    标签: http https http-headers


    【解决方案1】:

    我没有复制的是用户代理:Instagram 10.29.0 (iPhone7,2; iPhone OS 9_3_3; en_US; en-US; scale=2.00; 750x1334) AppleWebKit/420+

    使用用户代理它可以工作,因此 HTTP 标头将看起来像这样,以防有人编写 Instagram 故事保护程序)

    ["Content-Type": "application/json",
     "Accept-encoding": "gzip, deflate",
     "User-agent": "Instagram 10.29.0 (iPhone7,2; iPhone OS 9_3_3; en_US; en-US; scale=2.00; 750x1334) AppleWebKit/420+",
     "Cookie": "ds_user_id=67425...; sessionid=IGSCf716eb61b....]
    

    【讨论】:

      猜你喜欢
      • 2011-09-23
      • 2015-10-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-03
      • 2016-12-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多