2 cups whole milk
1/2 cup sugar
1/3 cup natural cocoa powder
4 teaspoons cornstarch
3 large egg yolks
2 teaspoons pure vanilla extract
1/4 teaspoon fine salt
Put 1 1/2 cups of the milk, the sugar, and the cocoa in a nonreactive saucepan. Bring to a simmer, over medium-high heat. Remove from the heat.
Meanwhile, whisk the remaining 1/2 cup of the milk, cornstarch, salt, egg yolks, and vanilla in a bowl. Gradually whisk the hot milk into the egg mixture. Return to the saucepan and cook over medium-high heat whisking constantly, until the pudding comes to a full boil. Reduce the heat to maintain a simmer, and continue whisking until thick, about 2 or 3 minutes more.
Recipe adapted from foodnetwork.com