D
D
Denis2016-01-26 17:20:50
Computer networks
Denis, 2016-01-26 17:20:50

How to correctly send a POST request at a low level of abstraction?

I am writing a program for a microcontroller (it doesn't matter which one)
There is a task to send messages to the server via a POST request via a mobile modem.
Step by step I will tell you what I am doing: I am
setting up the modem.
I create a TCP connection (for example, let's take the google.ru server) (AT+QIOPEN="TCP", "64.233.165.94",80 )
//reply about the success of the connection
I send the request:
POST https://www.google.ru HTTP /1.1
Host: www.google.ru
Content-Type: application/x-www-form-urlencoded
Content-Length: 3
m=5
The server is silent in response. In this case, if you simply send an incorrect request (example: HTTP1.1),
then the server returns a 400 error.
Please tell me what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Peter, 2016-01-26
@petermzg

POST https and port 80. Connection without encryption

D
Denis, 2016-01-26
@lacredin

I'm sorry, https happened to be there by accident.
I did it with http, the port as you see in the line (AT+QIOPEN="TCP", "64.233.165.94",80) is the eightieth.
Or should it be added somewhere else?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question