Encode the action attribute of a request.