Fixed serialization of parameters in the REST client. See also #189.