Cov txheej txheem:

Kuv yuav hloov HTTP thov hauv Chrome li cas?
Kuv yuav hloov HTTP thov hauv Chrome li cas?

Video: Kuv yuav hloov HTTP thov hauv Chrome li cas?

Video: Kuv yuav hloov HTTP thov hauv Chrome li cas?
Video: yuav hloov siab cas tsis hloov thaum ntxov by maiv yaj nkauj tawm tshiab 2024, Kaum ib hlis
Anonim

Yog tias koj xav hloov kho thiab rov xa daim ntawv thov uas koj tau ntes hauv Chrome Developer Tools 'Network tab:

  1. Right-click lub npe ntawm qhov kev thov.
  2. Xaiv Luam> Luam raws li cURL.
  3. Muab tshuaj txhuam rau kab hais kom ua (cov lus txib suav nrog cov ncuav qab zib thiab headers)
  4. Kho qhov kev thov raws li xav tau thiab khiav.

Xav txog qhov no, kuv yuav kho cov lus thov chrome li cas?

6 Teb. Chrome : Hauv Network vaj huam sib luag ntawm devtools, right-click thiab xaiv Copy li cURL. Muab tshuaj txhuam / Kho kom raug tus thov , thiab tom qab ntawd xa nws los ntawm lub davhlau ya nyob twg, xav tias koj muaj cov lus txib curl.

Tsis tas li ntawd, kuv yuav teeb HTTP headers hauv Chrome li cas? Chrome - yuav ua li cas ntxiv kev cai http thov headers

  1. Nruab qhov Hloov kho header plugin hauv Chrome browser.
  2. Qhib Chrome tus tsim cov cuab yeej thiab thauj cov url uas phim nrog cov qauv saum toj no. Koj yuav tsum tuaj yeem pom kev cai header hauv kev thov headers raws li qhia hauv qab no:
  3. Load ib url uas tsis phim nrog cov qauv saum toj no. Tam sim no peb cov kev cai header teb yuav tsum tsis muaj nyob rau hauv headers.

Ib tug kuj yuav nug, Kuv yuav ua li cas thiaj li thov tau hauv Chrome?

  1. Ua ntej tshaj plaws, koj yuav tsum qhib Google Chrome DevTools. Txhawm rau ua qhov ntawd, qhib Chrome ntawv qhia zaub mov. nyob rau sab xis saum toj ntawm koj lub qhov rais browser, tom qab ntawd xaiv Ntau Cov Cuab Yeej> Cov cuab yeej tsim tawm.
  2. Tom qab ntawd, koj yuav pom lub tab tshiab hu ua "Tamper" nyob rau sab xis saum toj, thiab nyem rau ntawm nws.

Yuav ua li cas curl kuv tus browser hais kom ua?

Yuav luam API li CURL:

  1. Qhib Chrome Developer Tools.
  2. Nkag mus rau Network Tab.
  3. Ua qhov kev txiav txim uas yuav ua rau qhov xav tau API thov.
  4. Txoj cai nyem qhov xav tau API hu.
  5. Xaiv "Copy" -> "Copy as CURL"

Pom zoo: