You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Form-Data in MCS

edited Sep 5, 2017 7:00AM in Digital Assistant & Mobile 1 comment

Summary

Form-Data in MCS

Content

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);                    }                );            }            

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!