Form-Data in MCS
Summary
Form-Data in MCSContent
Hi,
I have a rest api that accepts form-data for which i have created a connector api. How do i pass this form data to the connector api using custom api code.
I have tried something like this but my rest api does not get the values passed.
var body = { login: userId, password: password }; var headers = { 'content-type': 'multipart/form-data;' }; req.oracleMobile.connectors.OracleRightNow.post( constants.CONNECTOR_API_LOGIN_URI, JSON.stringify(body), { inType: 'json' }, { headers: headers }).then( function (result) { console.log('resut:' + result.result); }, function (error) { console.log('Error:' + error.error); res.send(error.statusCode, error.error); } ); }
1