Hillary Clinton, a candidate who has gone to great lengths to showcase the playful side of her personality, apparently wanted to prove that she can take not only a joke but a full interview of nonstop lampooning when she appeared on the mock celebrity interview show “Between Two Ferns.”

In an election cycle where late night hosts have been criticized for not putting heavy questions to the candidates, “Between Two Ferns” offers a strange alternative.

The show’s host, the comedian Zach Galifianakis, plays so oblivious that the questions he poses often read as nonsensical and offensive. (“What is it like to be the last black president?” Mr. Galifianakis asked President Obama with a straight face in 2014.)

The show has attracted high-profile guests, like Mr. Obama and Brad Pitt, who have willingly signed up to be mocked by Mr. Galifianakis. The results are often very popular on the internet, where Mrs. Clinton has striven to appeal to younger voters who might enjoy a well-placed cutting joke.