Koj siv Put li cas?
Koj siv Put li cas?

Video: Koj siv Put li cas?

Video: Koj siv Put li cas?
Video: Qhia caum yus tu hlub los yog saib yus tu hlub ua dab tsi 2021 2024, Kaum ib hlis
Anonim

PUT : Siv los tsim cov peev txheej, lossis sau nws. Thaum koj teev cov peev txheej tshiab URL. Cov PUT txoj kev thov kom lub xeev ntawm lub hom phiaj cov peev txheej tsim los yog hloov nrog lub xeev tau teev tseg los ntawm tus sawv cev nyob rau hauv cov lus thov them nyiaj.

Ib yam li ntawd, qhov sib txawv ntawm kev tshaj tawm thiab tso?

Cov qhov sib txawv ntawm POST thiab PUT yog tias PUT yog ideempotent, uas txhais tau tias, hu tib yam PUT thov ntau zaus yuav ib txwm tsim cov txiaj ntsig zoo ib yam (uas tsis muaj kev phiv), thaum ntawm qhov tod tes, hu rau a POST thov rov tuaj yeem muaj (ntxiv) cov kev mob tshwm sim los ntawm kev tsim cov peev txheej qub ntau zaus.

Tsis tas li ntawd, dab tsi yog post tau tso? PUT yog siv los xa cov ntaub ntawv mus rau lub server los tsim / hloov kho cov peev txheej. Qhov txawv ntawm POST thiab PUT yog tias PUT kev thov tsis muaj peev xwm. Piv txwv li, hu a POST thov rov muaj kev phiv los ntawm kev tsim cov peev txheej qub ntau zaus.

Tsis tas li ntawd, kuv puas tuaj yeem siv tus ncej es tsis txhob tso?

Yog, koj ua tau . POST tsis yog. Ib txoj kev thov raug suav hais tias yog "tsis muaj peev xwm" yog tias qhov xav tau ntawm cov neeg rau zaub mov ntawm ntau qhov kev thov zoo ib yam nrog rau txoj kev ntawd zoo ib yam li cov nyhuv rau ib qho kev thov.

PUT txoj kev yog dab tsi?

PUT . Cov PUT txoj kev thov kom lub koom haum uas nyob ib puag ncig yuav tsum tau muab khaws cia rau hauv daim ntawv thov-URI. Yog tias qhov Kev Thov-URI hais txog cov peev txheej uas twb muaj lawm, lub koom haum uas tau muab tso rau yuav tsum raug suav tias yog qhov hloov kho ntawm ib qho chaw nyob ntawm lub hauv paus server.

Pom zoo: