distinguishes between query- and form-parameters and handles encoding