RequestOptions yog dab tsi?
RequestOptions yog dab tsi?

Video: RequestOptions yog dab tsi?

Video: RequestOptions yog dab tsi?
Video: Exploring Headless Login for WPGraphQL with David Levine of AxePress 2024, Cuaj hlis
Anonim

Thov xaiv . thov ( Thov xaiv lwm yam) Thov xaiv . autoClone() Zoo ib yam li ntsuas phoo() tshwj tsis yog tias kev hloov pauv ua rau muaj kev ua haujlwm clone() tshwm sim ua ntej qhov kev hloov pauv uas ua rau txhua txoj hauv kev rov qab ib yam khoom tshiab thiab tawm hauv qhov qub xauv khoom tsis hloov kho.

Ib yam li ntawd, tib neeg nug, dab tsi yog kev xaiv thov?

Options thov yog preflight thov thaum koj xa (tshaj tawm) cov ntaub ntawv rau lwm tus sau. Nws yog qhov teeb meem kev ruaj ntseg browser.

Ib yam li ntawd, cov kev xaiv so yog dab tsi? Hauv REST OPTIONS yog ib txoj hauv kev qib annotation, cov lus piav qhia no qhia tias cov qauv hauv qab no yuav teb rau HTTP OPTIONS thov xwb. Nws yog siv los thov, rau cov ntaub ntawv hais txog kev sib txuas lus kev xaiv muaj rau kev pab.

Tsis tas li ntawd, kev siv cov kev xaiv thov yog dab tsi?

Txoj kev HTTP OPTIONS yog siv los thov cov ntaub ntawv hais txog cov kev sib txuas lus cov kev xaiv muaj rau lub hom phiaj peev txheej. Cov lus teb tuaj yeem suav nrog Daim Ntawv Tso Cai Tso Cai uas qhia txog kev tso cai HTTP txoj hauv kev ntawm cov peev txheej, lossis ntau yam Cross Origin Resource Sharing headers.

Dab tsi yog nrog Daim Ntawv Pov Thawj hauv angular?

XMLHttpRequest. nrog daim ntawv pov thawj . Puas yog Boolean uas qhia seb puas lossis tsis hla qhov chaw nkag-Control thov yuav tsum tau siv cov ntaub ntawv pov thawj xws li ncuav qab zib lossis cov ntawv tso cai. Lub neej ntawd yog cuav. Nco tseg: Qhov no yeej tsis cuam tshuam rau tib lub xaib thov. Muaj ob peb tug lub kaum sab xis cov teeb meem cuam tshuam nrogCredtials.

Pom zoo: