Add logic to handle POST response