set the correct response type and status