Cov txheej txheem:

Postman cov ntsiab lus yog dab tsi?
Postman cov ntsiab lus yog dab tsi?

Video: Postman cov ntsiab lus yog dab tsi?

Video: Postman cov ntsiab lus yog dab tsi?
Video: Post Malone, Swae Lee - Sunflower (Spider-Man: Into the Spider-Verse) 2024, Kaum ib hlis
Anonim

Rau daim ntawv-cov ntaub ntawv thiab urlencoded lub cev hom , Postman yuav cia li muab qhov tseeb Cov ntsiab lus - Hom taub hau. Yog tias koj siv hom raw rau koj lub cev cov ntaub ntawv, Postman yuav teeb lub header raws li qhov hom koj xaiv (piv txwv li ntawv nyeem, json). Postman tsis teem ib lub header hom rau lub cev binary hom.

Tsis tas li ntawd, koj sau cov ntsiab lus hauv Postman li cas?

Koj tuaj yeem teem ib hom ntsiab lus header manually yog tias koj xav tau override ib qho Postman xa tuaj. Koj tuaj yeem siv cov kev hloov pauv hauv koj lub cev cov ntaub ntawv thiab Postman yuav populate lawv cov nqi tam sim no thaum xa koj qhov kev thov. Xaiv cov ntawv hauv tus editor thiab nias CMD / CTRL + B kom zoo nkauj koj XML / JSON.

Ib tug kuj yuav nug, tus xa ntawv yog dab tsi? Postman yog Google Chrome app rau kev cuam tshuam nrog HTTP APIs. Nws nthuav qhia koj nrog tus phooj ywg GUI rau kev tsim cov lus thov thiab nyeem cov lus teb. Cov neeg tom qab Postman kuj tseem muab cov pob ntxiv hu ua Jetpacks, uas suav nrog qee cov cuab yeej automation thiab, qhov tseem ceeb tshaj plaws, lub tsev qiv ntawv Javascript xeem.

Tom qab ntawd, lo lus nug yog, Kuv yuav hloov cov ntsiab lus hauv cov lus teb li cas?

Mus rau lub cev tab, xaiv 'raw' los ntawm sub menu. Nyob rau sab xis ntawm 'binary' nyob rau hauv cov ntawv qhia zaub mov, ib daim ntawv teev npe yuav muaj. Xaiv 'Text' (tsis yog 'Text[text/plain]') los ntawm daim ntawv no. Qhov no yuav tshem tawm cov Cov ntsiab lus - Ntaus header.

Yuav siv cov kev hloov pauv li cas hauv Postman?

Siv cov kev hloov pauv

  1. Nyem qhov Ib puag ncig ceev saib (lub qhov muag khawm) nyob rau sab xis saum toj ntawm Postman thiab nyem Kho kom raug ib sab ntawm Ntiaj Teb.
  2. Ntxiv qhov sib txawv npe hu ua my_variable thiab muab nws tus nqi pib ntawm Hello -click Txuag thiab kaw qhov chaw ib puag ncig modal.
  3. Xa daim ntawv thov. Hauv cov lus teb, koj yuav pom tias Postman xa tus nqi hloov pauv mus rau API.

Pom zoo: