use POST method using Arduino mega2560 and without Ethernet Shield


I have succeeded in comnnunicating with a web server using Arduino2560 and using GET method and without Ethernet shield.

I would like to use POST method without Ethernet shield and Arduino2560.

Please help me.

regards Unnikrishnan

Can you post your code and schematic? Most conventional methods of communicating with a web server require a tcp/ip capable device like an Ethernet or wlan device.

At present I have used GET method

So how do you connect to your server?

String url = "http://xxxxxxx/api/v1/

and send data using http://xxxxxxxxxx/api/v1/pinData?data=1,d11,a0,0,16-11-2016,0001/

You send it with what? What is the part of your hardware implementing TCP/IP and HTTP protocol?

GET and POST are commands that the httpd daemon, running on a web server, understands.

The Arduino, without an ethernet shield, can not talk to a web server.

So, your claim that you are able to perform a GET without an ethernet shield is nonsense.

Well may be he used an ESP8266 :)

I am strongly inclined to @PaulS's point of view.

If you can construct a working sentence using GET then for a POST you just need to change the word GET to the word POST.

However I suspect the real problem is that you do not know what data your webserver expects in POST sentence and we cannot help you with that. You need to find the documentation for the application the webserver is running.

...R PS.. To follow up @J-M-L's comment, I had assumed the OP would have told us if that is the case.

J-M-L: Well may be he used an ESP8266 :)

He said he used a Mega.

Yes may be with an ESP on serial port... that will be Xmas' mystery :)