Optimal quadrature problem on Hardy--Sobolev classes