Measuring the mechanical response of swollen hydrogels