Added logic to pre-populate the parameters and support for multipart form-data.