abigdreamer
Posts: 0
Joined: Fri Jul 12, 2013 7:20 pm

JSON Request in Appery

The JSON documentation says I use a format like below to request info. How do I format this into a request in Appery? I think its a POST

{
"auth":"Your API Key",
"method":"MethodName",
"params": {
"paramName":"paramValue",
"paramName2":"paramValue2",
},
"returnFormat":"optional"
}

abigdreamer
Posts: 0
Joined: Fri Jul 12, 2013 7:20 pm

JSON Request in Appery

FYI there was a URL linked to a PHP file -- in the beginning. I have the api key and sample methods and parameters.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

JSON Request in Appery

Hi Mike,

Yes. Please specify these service parameters:

method:post
Data Type:json
Content Type: json

Where auth, method etc are service request parameters.

zaik
Posts: 0
Joined: Wed Sep 09, 2015 7:15 am

JSON Request in Appery

I am unable to receive POST values in my webservice.

The empty array is against print_r($_POST);

and other are messages shiown in $_POST is empty.

It worked correctly when i change REQUEST CONTENT TYPE to x-www-form-urlencoded.

I want to use $_POST in it.

Image Image

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

JSON Request in Appery

Hello,

Please check this code:

pre$parameters = json_decode(file_get_contents('php://input'));
print_r(parameters);/pre

Return to “Issues”