Using API call that I have instead fot a database using Generator ? - Page 2

Using API call that I have instead fot a database using Generator ?

2»

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Into the edit object. That is just passed stright thought to $.ajax, so any options that you can use in $.ajax are available here as well.

    Allan

  • samsamtestsamsamtest Posts: 52Questions: 15Answers: 1

    HI thanks, could you send me an example code... please.. I am going crazy with this function, thanks :-)

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    edit: {
        url: "...."
        type: "POST",
        headers: {
            "Content-Type": "application/json; charset=utf-8",
        },
        contentType: "application/json",
     
        data: function(d) {
            return JSON.stringify(d);
        },
        processData: function ( str ) {
            var json = JSON.parse( str );
            // do something with json
            return JSON.stringify( json );
        }
    },
    

    Allan

This discussion has been closed.