Click here to Skip to main content
14,921,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All

As a newbie I am struggling when attempting to POST JSON arrays.

The URL I want to post to
http://192.168.150.210/ajax/cfgpars.json?rauth=0x04

The JSON array to POST
{"FileName":"cfgpars.json","CmdArr":[["set","gpio","state","4","on"]]}

What I have tried:

This works with various REST test tools but can anyone point me to some sample jsp code to do this (no device or user authentication is required). I have seen some examples but they are upwards of 50 lines of code which seems far too complex for such a simple command.

Regards
Active
Posted
Comments
Prateek Dalbehera 10-Jul-16 14:18pm
   
can you use jquery ajax for post....
Member 2389900 11-Jul-16 2:55am
   
Hello Prateek

I was trying to avoid jquery as it relies on an 'external' object and jquery doesn't seem to work properly in Eclipse (where I was hoping to test any code).

Regards
Active


Prateek Dalbehera 12-Jul-16 5:15am
   
Hi , I am a c# developer & have never tried jsp... So no more idea abt that

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900