package Ġio . ktor . request Ċ Ċ import Ġio . ktor . application .* Ċ import Ġio . ktor . c io .* Ċ import Ġio . ktor . content .* Ċ import Ġio . ktor . pipeline .* Ċ import Ġio . ktor . util .* Ċ import Ġjava . io .* Ċ import Ġkotlin . reflect .* Ċ Ċ class ĠApplication Receive Request ( val Ġtype : ĠK Class <* >, Ġval Ġvalue : ĠAny ) Ċ open Ġclass ĠApplication Receive Pipeline Ġ: ĠPipeline < Application Receive Request , ĠApplication Call >( Before , ĠTransform , ĠAfter ) Ġ{ ĊĠĠĠ Ġcompanion Ġobject ĠPh ases Ġ{ ĊĠĠĠĠĠĠĠ Ġval ĠBefore Ġ= ĠPipeline Phase (" Before ") ĊĊĠĠĠĠĠĠĠ Ġval ĠTransform Ġ= ĠPipeline Phase (" Transform ") ĊĊĠĠĠĠĠĠĠ Ġval ĠAfter Ġ= ĠPipeline Phase (" After ") ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Deprecated (" Use Ġreceive OrNull Ġinstead ", ĠReplace With (" this . receive OrNull < T >() ")) Ċ inline Ġsuspend Ġfun Ġ< re ified ĠT Ġ: ĠAny > ĠApplication Call . try Receive (): ĠT ? Ġ= Ġreceive OrNull () Ċ Ċ inline Ġsuspend Ġfun Ġ< re ified ĠT Ġ: ĠAny > ĠApplication Call . receive OrNull (): ĠT ? Ġ= Ġreceive OrNull ( T :: class ) Ċ inline Ġsuspend Ġfun Ġ< re ified ĠT Ġ: ĠAny > ĠApplication Call . receive (): ĠT Ġ{ ĊĠĠĠ Ġval Ġtype Ġ= ĠT :: class ĊĠĠĠ Ġreturn Ġreceive OrNull ( type ) Ġ?: Ġthrow ĠContent Transformation Exception (" Cannot Ġtransform Ġthis Ġrequest 's Ġcontent Ġto Ġ$ type ") Ċ } Ċ Ċ /** Ċ Ġ* ĠReceive Ġcontent Ġfor Ġthis Ġrequest Ċ Ġ*/ Ċ suspend Ġfun Ġ< T Ġ: ĠAny > ĠApplication Call . receive OrNull ( type : ĠK Class < T >): ĠT ? Ġ{ ĊĠĠĠ Ġval Ġincoming Content Ġ= Ġrequest . receive Content () ĊĠĠĠ Ġval Ġreceive Request Ġ= ĠApplication Receive Request ( type , Ġincoming Content ) ĊĠĠĠ Ġval Ġtransformed Ġ= Ġrequest . pipeline . execute ( this , Ġreceive Request ). value ĊĠĠĠ Ġif Ġ( transformed Ġis ĠIncoming Content ) ĊĠĠĠĠĠĠĠ Ġreturn Ġnull ĊĊĠĠĠ Ġ@ Suppress (" UN CHECK ED _ CAST ") ĊĠĠĠ Ġreturn Ġtransformed Ġas ? ĠT Ċ } Ċ Ċ @ Suppress (" NOTH ING _ TO _ INLINE ") Ċ inline Ġsuspend Ġfun ĠApplication Call . receive Text (): ĠString Ġ= Ġreceive () Ċ Ċ @ Suppress (" NOTH ING _ TO _ INLINE ") Ċ inline Ġsuspend Ġfun ĠApplication Call . receive Channel (): ĠRead Channel Ġ= Ġreceive () Ċ Ċ @ Suppress (" NOTH ING _ TO _ INLINE ") Ċ inline Ġsuspend Ġfun ĠApplication Call . receive Stream (): ĠInputStream Ġ= Ġreceive () Ċ Ċ @ Suppress (" NOTH ING _ TO _ INLINE ") Ċ inline Ġsuspend Ġfun ĠApplication Call . receive Multipart (): ĠMulti Part Data Ġ= Ġreceive () Ċ Ċ @ Suppress (" NOTH ING _ TO _ INLINE ") Ċ inline Ġsuspend Ġfun ĠApplication Call . receive Parameters (): ĠValues Map Ġ= Ġreceive () Ċ Ċ class ĠContent Transformation Exception ( message : ĠString ) Ġ: ĠException ( message )