Fix REST format parameter handling.

In the non-form case, the format variable wasn't set properly.