0

i have a problem with post data,

let bodydata = JSON.stringify({
        fonk: 'usrlogin',
        login_userid: '111111',
        passsha:'d4c59285sds62233bc232e0f205esd8b7e'
    });

let bodydata1 = "fonk=usrlogin&login_userid=111111&passsha=d4c59285sds62233bc232e0f205esd8b7e"

const data = yield call(request, 'http://11.11.11.11/JSONRESTfulServices-1/rest/products/solrpost', {
    method: 'POST',
    headers: {

        'Content-Type': 'application/x-www-form-urlencoded',

   },
    body: bodydata1
});

yield  put(dropExternal(data))

i can take data with 'bodydata1' but i want to take 'bodydata' so, to be regular and readable code, how to

1 Answers1

0

i found ,

 let bodydata = jQuery.param({
        fonk: 'usrlogin',
        login_userid: '111111',
        passsha:'d4c59285sds62233bc232e0f205esd8b7e'
    });

Jquery.param