package Ġguide . modules . ham k rest Ċ Ċ import Ġcom . nat pr y ce . ham k rest . and Ċ import Ġcom . nat pr y ce . ham k rest . equalTo Ċ import Ġcom . nat pr y ce . ham k rest . should . should Match Ċ import Ġorg . http 4 k . core . Body Ċ import Ġorg . http 4 k . core . ContentType Ċ import Ġorg . http 4 k . core . Method Ċ import Ġorg . http 4 k . core . Request Ċ import Ġorg . http 4 k . core . Response Ċ import Ġorg . http 4 k . core . Status . Companion . OK Ċ import Ġorg . http 4 k . ham k rest . has Body Ċ import Ġorg . http 4 k . ham k rest . has Header Ċ import Ġorg . http 4 k . ham k rest . has Query Ċ import Ġorg . http 4 k . ham k rest . has Status Ċ import Ġorg . http 4 k . lens . string Ċ Ċ fun Ġmain () Ġ{ ĊĊĠĠĠ Ġval Ġrequest Ġ= ĠRequest ( Method . POST , Ġ"/ ? a = b "). body (" http 4 k Ġis Ġcool "). header (" my Ġheader ", Ġ" a Ġvalue ") ĊĊĠĠĠ Ġ// Ġstatus ĊĠĠĠ ĠResponse ( OK ) Ġshould Match Ġhas Status ( OK ) ĊĊĠĠĠ Ġ// Ġquery ĊĠĠĠ Ġrequest Ġshould Match Ġhas Query (" a ", Ġ" b ") ĊĊĠĠĠ Ġ// Ġheader ĊĠĠĠ Ġrequest Ġshould Match Ġhas Header (" my Ġheader ", Ġ" a Ġvalue ") ĊĊĠĠĠ Ġ// Ġbody ĊĠĠĠ Ġrequest Ġshould Match Ġhas Body ( equalTo (" http 4 k Ġis Ġcool ")) ĊĠĠĠ Ġrequest Ġshould Match Ġhas Body (" http 4 k Ġis Ġcool ") ĊĠĠĠ Ġrequest Ġshould Match Ġhas Body ( Body . string ( ContentType . TEXT _ HTML ). to Lens (), ĠequalTo (" http 4 k Ġis Ġcool ")) ĊĊĠĠĠ Ġ// Ġcomposite ĊĠĠĠ Ġrequest Ġshould Match Ġhas Body ( equalTo (" http 4 k Ġis Ġcool ")). and ( has Query (" a ", Ġ" b ")) Ċ } Ċ