postman 一個也許可以節省你大量時間的小技巧

ruby發表於2019-09-01

有時候我們想在 postman 重現瀏覽器上的某個請求(比如伺服器上報錯了,需要對該次請求除錯),以往可能大家會把 url、引數、header 一個個地複製到 postman 裡面,然後點 postman 的 send 傳送請求。

chrome 有個很好用的功能是,把請求複製為 curl 格式,如下:

copy as curl

右鍵請求 -> copy -> copy as curl。

現在我們的貼上板裡面有個 curl 格式的請求,接下來我們開啟 postman,點選左上角 Import,然後點 Paste Raw Text,然後點選 Import 完成匯入。

import curl

這時候我們就把請求的完整資訊複製到了 postman:

header

params

相關文章