HttpHeaders yog dab tsi?
HttpHeaders yog dab tsi?

Video: HttpHeaders yog dab tsi?

Video: HttpHeaders yog dab tsi?
Video: API o'zi nima? 2-qism 2024, Kaum ib hlis
Anonim

HTTP headers cia tus neeg siv khoom thiab tus neeg rau zaub mov xa cov ntaub ntawv ntxiv nrog HTTP thov lossis teb. HTTP header muaj nws cov ntaub ntawv-insensitive lub npe ua raws li txoj hnyuv loj (:), tom qab ntawd los ntawm nws tus nqi. IANA kuj tseem tuav cov npe ntawm cov ntawv thov tshiab HTTP headers.

Ntxiv mus, HttpHeaders yog dab tsi hauv Java?

Interface HttpHeaders . Ib qho kev txhaj tshuaj interface uas muab kev nkag mus rau HTTP header cov ntaub ntawv. Txhua txoj hauv kev pov tseg IllegalStateException yog hu rau sab nraud ntawm qhov kev thov (xws li los ntawm tus kws kho mob tsim).

Ib tug kuj yuav nug, HttpHeaders caij nplooj ntoos hlav khau raj yog dab tsi? pej xeem chav kawm HttpHeaders Extens Object siv MultiValueMap, Serializable. Cov qauv ntaub ntawv sawv cev rau HTTP thov lossis cov lus teb headers, kos npe rau cov npe ntawm String header rau ib daim ntawv teev cov txiaj ntsig ntawm String, kuj muab cov khoom siv rau cov hom ntaub ntawv-qib hom.

Ib yam li ntawd, cov lus thov thiab cov lus teb yog dab tsi?

Cov ntaub ntawv, nyob rau hauv daim ntawv ntawm cov ntawv sau, uas lub Web server xa rov qab mus rau tus neeg siv lub browser hauv teb tau txais ib qho HTTP thov . Cov teb header muaj hnub tim, qhov loj thiab hom ntaub ntawv uas tus neeg rau zaub mov xa rov qab mus rau tus neeg siv khoom thiab cov ntaub ntawv hais txog lub server nws tus kheej.

Lub hom phiaj ntawm HTTP thov yog dab tsi?

HTTP thov . Ib HTTP thov yog tsim los ntawm tus neeg siv khoom, mus rau lub npe hu ua, uas nyob rau ntawm lub server. Lub hom phiaj ntawm thov yog nkag mus rau ib qho peev txheej ntawm lub server. Ua tus thov , tus neeg siv khoom siv cov khoom ntawm URL (Uniform Resource Locator), uas suav nrog cov ntaub ntawv xav tau los nkag rau cov peev txheej.

Pom zoo: