Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70429

HTTP Post to php api returns null

$
0
0

@snehalp wrote:

Hi,

i'm using this api https://github.com/mevdschee/php-crud-api on my server here http://activeengg.com/sandbox/api.php/teams/ , GET works fine, but POST always returns a null, when it should return the new record id.
Tried the proxy for CORS but at times the request converts to OPTIONS.
Also tried adding Access-Control-Allow-Origin to the api.php.

tested the API here https://www.hurl.it/
using http://activeengg.com/sandbox/api.php/teams/ using these
'{"sportid": “1”, "eventid": "1","teamname":"snehal","active":"1"}';
as parameters and it works great.

Been at this for days now, any breakthrough would be just wonderful.

Thanks
Snehal

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70429

Trending Articles