But I could not be certain, really, that it might not be I who was making a mistake, blindly misreading everything – and out necessities, then, too shameful to be uttered. I was in a box for I could see that, no matter how I turned, the hour of confession was upon me and could scarcely be averted; unless of course, I leaped out of the cab, which would be the most terrible confession of all. (1.3.18)
Reading this passage, we already know what is going to happen. For that reason, David's denial seems paper-thin. Perhaps, though, it is only the fact that things have become clarified in his memory. Perhaps at the time David actually had convinced himself that he didn't want to sleep with Giovanni. Does David have a choice other than going home with Giovanni or getting out of the cab? Is there any choice he could make that would deny or hide the fact that he is attracted to Giovanni?