Click here to Skip to main content
15,124,736 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi i have post request

function GetTokenfromGrap(resource, obj, failureCallback) {
            var deffered = $q.defer();
            resource = '/'
            var url = baseUrl + resource;
                var configurations = {
                    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
            $, obj, configurations).then(deffered.resolve).catch(function (data) {
                if (typeof failureCallback === 'function') failureCallback(data);
            return deffered.promise;

i want to add body to this request , how can i do this

What I have tried:

i googled it but i didn't get any solution
Updated 20-Jun-18 0:49am

1 solution

"obj" is the body.
Mahesh Alappuzha 20-Jun-18 6:37am
i given the body as obj but getting a error "ReferenceError: data is not defined↵ at eval (eval at GetTokenfromGrap " how can i resolve this

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900