Ajax Post Error (with myjson.com)

Discussion and feedback on Construct 2

Post » Thu Feb 09, 2017 2:33 am

Hi all!

I am trying to use http://myjson.com "A simple JSON store for your web or mobile app", with no result!

In http://myjson.com/api they say to use
Code: Select all
var obj = {
    "key": "value",
    "key2": "value2"
};
var data = JSON.stringify(obj);

   $.ajax({
        url: "https://api.myjson.com/bins",
        type: "POST",
        data: data,
        contentType: "application/json; charset=utf-8",
        dataType: "json",
            });


And in C2 I try
Image
With this error
HTTP500 Server Error
{"status":500,"message":"Internal Server Error","more_info":"undefined method `string' for #\u003cPhusionPassenger::Utils::TeeInput:0x007f8039c3fe90\u003e"}


Please somebody could help?

Thanks
B
110
S
12
G
8
Posts: 180
Reputation: 8,878

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 20 guests