user13760: If arduino works as a client and tries to connect to web server (the server is mine), should I connect to it via TCP or HTTP connection? Data will be simple strings (20 chars at max) so TCP connection should probably be enough? 
The connection has to work in both ways - web server sending data to arduino and arduino sending data back to server. 

user4143: It's time you learned the OSI 7 layer model: PDNTSPA.
HTTP is a Presentation (protocol) that runs over a TCP Session.  If you are interacting with a web server then you will be opening a TCP socket and sending HTTP requests.
There is no other way of talking to a web server. It only speaks HTTP, and you can only connect to it through TCP.

13760: <p>If arduino works as a client and tries to connect to web server (the server is mine), should I connect to it via TCP or HTTP connection? Data will be simple strings (20 chars at max) so TCP connection should probably be enough? </p>

<p>The connection has to work in both ways - web server sending data to arduino and arduino sending data back to server. </p>
 4143: <p>It's time you learned the <a href="https://en.wikipedia.org/wiki/OSI_model" rel="nofollow">OSI 7 layer model: PDNTSPA</a>.</p>

<p>HTTP is a <em>P</em>resentation (protocol) that runs over a TCP <em>S</em>ession.  If you are interacting with a web server then you will be opening a TCP socket and sending HTTP requests.</p>

<p>There is no other way of talking to a web server. It only speaks HTTP, and you can only connect to it through TCP.</p>
