0 Favourites

Posting Base 64 encoded string via Ajax Post

  • I'm trying convert the below in a string that I can then bae64 encode using btoa( myString)

    But i can't for the life of me get the below Json string formatted in a way that i can run the btoa function on it.

    {

        "event": "Signed Up",

        "properties": {

            // "distinct_id" and "token" are

            // special properties, described below.

            "distinct_id": "13793",

            "token": "e3bc4100330c35722740fb8c6f5abddc",

            "Referred By": "Friend"

        }

    }

    I've tried using \n to replace all the carriage returns. and "" for all the " and still i can't get this to work.

    Help!

    Would be great if C2 could handle JSON in the editor. The AJAX Object is kind of crappy to deal with and for other projects i've written my own plugins to get around this.....

    Having a bad JSON formatting day. Please help

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • I made my own plugin to do that for me, i think there is a way to search for all those characters using C2 c2 functions.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)