But they had to survive for 25 minutes with 10 men after Christian Kabasele was dismissed for his second yellow card.
Foster said afterwards, "It's been a while, near six months, it's ridiculous. There's only so long you can say its going to come and we're so glad it has tonight."
On manager Quique Sanchez Flores, he added: "He is a great guy, he's full of energy and it's a massive win for him and for the fans - but I'm really happy for him.
"He's exactly what we need at this time, he's full of confidence and he understands we're all human.
"We've got the talent and the ability. The confidence has taken a massive hit and this is going to do wonders for it."