package Ġorg . xia ox ing qi . gmd oc . core . http Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . text . TextUtils Ċ import Ġio . reactivex . Observable Ċ import Ġokhttp 3 . Interceptor Ċ import Ġokhttp 3 . Response Ċ import Ġorg . xia ox ing qi . gmd oc . impl . I Constant Ċ import Ġorg . xia ox ing qi . gmd oc . tools . Preference Tools Ċ Ċ /** Ċ Ġ* Ġæ·»åĬł head ä¸Ń cookie Ċ Ġ* Ġ*/ Ċ class ĠRequest Head Intercept ot ( val Ġcontext : ĠContext ) Ġ: ĠInter ceptor Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġintercept ( chain : ĠInter ceptor . Chain ): ĠResponse Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġproceed Ġ= Ġchain . request (). newBuilder () ĊĠĠĠĠĠĠĠ Ġif Ġ(! TextUtils . isEmpty ( Preference Tools . get Obj ( context , ĠI Constant . COOKIE , ĠString :: class . java ))) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġproceed . add Header (" Cookie ", ĠPreference Tools . get Obj ( context , ĠI Constant . COOKIE , ĠString :: class . java )) ĊĠĠĠĠĠĠĠ Ġ} Ċ // ĠĠĠĠĠĠĠ ĠObservable . just ( Preference Tools . get Obj ( context , ĠI Constant . COOKIE , ĠString :: class . java )). subscribe () ĊĠĠĠĠĠĠĠ Ġreturn Ġchain . proceed ( proceed . build ()) ĊĠĠĠ Ġ} Ċ }