Sometimes, restaurant delivery isn’t just for food.

Demi Sweeney, who lives in England, got creative last week when one of her worst fears appeared before her eyes: a spider. Sweeney has a pronounced phobia of spiders and regularly loses sleep just thinking about the eight-legged crawlers, she said.

So when she saw one in her house, which she estimated measured about an inch, she called her friend in a heart-racing panic.

Her housemates were not home. None of her other friends was around, as it is the end of the academic school year at Bournemouth University, and they were all busy studying or had already left for the summer.

The friend on the phone suggested she order food delivery and see whether the driver would do her a solid and take care of the spider.

Brilliant idea, she thought. But would it work?

“Hello (sounds silly but I have a serious question)” Sweeney, 22, wrote to the customer service folks at Deliveroo restaurant delivery service. “I have a huge phobia of spiders.”

Then she asked if she ordered food, would the driver get rid of it?

“You can most certainly request this,” the customer service rep responded.

But the rep added: no guarantees, because the driver may be more afraid of spiders than you are.

Sweeney, who is a criminal justice major, decided to go for it. She meant to order one KFC meal, but she was so flustered she mistakenly ordered two. When the driver, a guy named Joe, showed up with her food 20 minutes later, she made her request calmly, trying not to sound loony.

Joe laughed and told her he didn’t like spiders, either.

“I then begged telling him, ‘Please, you have to help me – I only ordered food for your help,’ ” Sweeney said in an email to The Post.

Joe decided to help her out. He climbed on a chair and swatted at it, and it fell to the ground. He followed it and ended up flushing it down the toilet.

“I can’t believe the plan actually worked,” Sweeney wrote in her email. “I thanked him so many times, I literally could have hugged him. He’s a hero.”

She said she was afraid to use the toilet for the rest of the day.

Sweeney posted her story on Twitter, telling Joe, “you are an actual LIFESAVER.”

Deliveroo released a statement saying Joe wasn’t available for comment, and “We can’t guarantee a spider catching service every time you order a Pad Thai or a Margherita, but in Demi’s case we’re glad the creepy crawly won’t be causing any more trouble!”

Social media gave Sweeney virtual claps for owning her fear and being bold in looking for help. And bigger claps for Joe, the spider-flushing delivery hero.

Read more:

After an abusive childhood in foster care, this executive sees success as his revenge.

I teach writing in prison. During one class, things got real — even for me.