I'm trying to make simple HTTP command ''POST'' but with no success.
I use format:
POST /page.php HTTP/1.1/r/n
HOST: mypage.com /r/n
Content-Type: application/x-www-form-urlencoded/r/n
/r/n
var1=1&var2=2&var3=3
I'm working with EB-023 internet board (with old W3100A ).
I use TCP_IP component Initialization->Create_TCP_Socket->TCP_Connect->(Sending HTML -> Tx_Start, Tx_SendByte->Tx_End).
Is this way is correct?
Please help me.
Kind regards
Mile
Making a simple HTTP POST with EB-023
Moderator: Benj
Re: Making a simple HTTP POST with EB-023
Ok thanks, /r/n but actually I’m sending CRLF -> Chr(13)Chr(10) so that is not problem. I’m asking the all flow process for POSTing.
Kind regards
Mile
Kind regards
Mile
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Making a simple HTTP POST with EB-023
Ah right, OK. Yes the flow looks OK. You will need to listen for a reply.
Are you connecting with your own local server? As you will need to setup the IP addresses accordingly. The TCP component won’t do the DNS lookup for you.
Are you connecting with your own local server? As you will need to setup the IP addresses accordingly. The TCP component won’t do the DNS lookup for you.
Re: Making a simple HTTP POST with EB-023
I 'm conecting with remote web server, with fixed ip. Could you explained the whole process step by step ?
Kind regards
Mile
Kind regards
Mile
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Making a simple HTTP POST with EB-023
using the TCP/IP component:
Initialize
Create_TCP_Socket
TCP_Connect
Send the request (Tx_start, Tx_sendbyte, Tx_end)
Loop waiting reply
{
Ready = Rx_data_available
Delay 500ms
If Ready <> 0 {Read the data (Rx_readbyte)}
}
Initialize
Create_TCP_Socket
TCP_Connect
Send the request (Tx_start, Tx_sendbyte, Tx_end)
Loop waiting reply
{
Ready = Rx_data_available
Delay 500ms
If Ready <> 0 {Read the data (Rx_readbyte)}
}