From the recording John chapters 12 to 21

After this, Jesus knowing that all things were now accomplished, that the Scripture might be fulfilled, saith, I thirst.
29 Now there was set a vessel full of vinegar: and they filled a sponge with vinegar, and put it upon hyssop, and put it to his mouth.
30 When Jesus therefore had received the vinegar, he said, It is finished: and he bowed his head, and gave up the ghost. John 19:28-30