Results 1 to 12 of 12

Thread: Correct POST html with JSON data

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Join Date
    Aug 2015
    Posts
    7
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Correct POST html with JSON data

    Firstly I will show Logs from wireshark, ofcorse this is not all, because content is to big as for put to this post. This is after execute request from html file. Him content is above in my post. So may be now You Can tell me how Can I build request in Qt

    What your code sends as the request body is a raw JSON string
    Can You tell me more ? How Can I do that in Qt ?

    No. Time Source Destination Protocol Length Info
    9 16.442812000 192.168.1.100 192.168.1.108 TCP 74 39008→80 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=25654464 TSecr=0 WS=128

    Frame 9: 74 bytes on wire (592 bits), 74 bytes captured (592 bits) on interface 0
    Interface id: 0 (wlan0)
    Encapsulation type: Ethernet (1)
    Arrival Time: Aug 19, 2015 09:53:07.607279000 CEST
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1439970787.607279000 seconds
    [Time delta from previous captured frame: 2.512966000 seconds]
    [Time delta from previous displayed frame: 0.000000000 seconds]
    [Time since reference or first frame: 16.442812000 seconds]
    Frame Number: 9
    Frame Length: 74 bytes (592 bits)
    Capture Length: 74 bytes (592 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:ethertype:ip:tcp]
    [Coloring Rule Name: HTTP]
    [Coloring Rule String: http || tcp.port == 80 || http2]
    Ethernet II, Src: HonHaiPr_3b:8d:ce (e4:d5:3d:3b:8d:ce), Dst:xxx_03:0d:f5 (18:cc:23:03:0d:f5)
    Internet Protocol Version 4, Src: 192.168.1.100 (192.168.1.100), Dst: 192.168.1.108 (192.168.1.108)
    Transmission Control Protocol, Src Port: 39008 (39008), Dst Port: 80 (80), Seq: 0, Len: 0

    No. Time Source Destination Protocol Length Info
    10 16.444134000 192.168.1.108 192.168.1.100 TCP 74 80→39008 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 SACK_PERM=1 TSval=378311 TSecr=25654464 WS=4

    Frame 10: 74 bytes on wire (592 bits), 74 bytes captured (592 bits) on interface 0
    Interface id: 0 (wlan0)
    Encapsulation type: Ethernet (1)
    Arrival Time: Aug 19, 2015 09:53:07.608601000 CEST
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1439970787.608601000 seconds
    [Time delta from previous captured frame: 0.001322000 seconds]
    [Time delta from previous displayed frame: 0.001322000 seconds]
    [Time since reference or first frame: 16.444134000 seconds]
    Frame Number: 10
    Frame Length: 74 bytes (592 bits)
    Capture Length: 74 bytes (592 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:ethertype:ip:tcp]
    [Coloring Rule Name: HTTP]
    [Coloring Rule String: http || tcp.port == 80 || http2]
    Ethernet II, Src: xxxx_03:0d:f5 (18:cc:23:03:0d:f5), Dst: HonHaiPr_3b:8d:ce (e4:d5:3d:3b:8d:ce)
    Internet Protocol Version 4, Src: 192.168.1.108 (192.168.1.108), Dst: 192.168.1.100 (192.168.1.100)
    Transmission Control Protocol, Src Port: 80 (80), Dst Port: 39008 (39008), Seq: 0, Ack: 1, Len: 0


    No. Time Source Destination Protocol Length Info
    12 16.444457000 192.168.1.100 192.168.1.108 HTTP 613 POST /ask.cgi HTTP/1.1 (application/x-www-form-urlencoded)

    Frame 12: 613 bytes on wire (4904 bits), 613 bytes captured (4904 bits) on interface 0
    Interface id: 0 (wlan0)
    Encapsulation type: Ethernet (1)
    Arrival Time: Aug 19, 2015 09:53:07.608924000 CEST
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1439970787.608924000 seconds
    [Time delta from previous captured frame: 0.000284000 seconds]
    [Time delta from previous displayed frame: 0.000284000 seconds]
    [Time since reference or first frame: 16.444457000 seconds]
    Frame Number: 12
    Frame Length: 613 bytes (4904 bits)
    Capture Length: 613 bytes (4904 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:ethertype:ip:tcp:http:urlencoded-form]
    [Number of per-protocol-data: 1]
    [Hypertext Transfer Protocol, key 0]
    [Coloring Rule Name: HTTP]
    [Coloring Rule String: http || tcp.port == 80 || http2]
    Ethernet II, Src: HonHaiPr_3b:8d:ce (e4:d5:3d:3b:8d:ce), Dst: xxx_03:0d:f5 (18:cc:23:03:0d:f5)
    Internet Protocol Version 4, Src: 192.168.1.100 (192.168.1.100), Dst: 192.168.1.108 (192.168.1.108)
    Transmission Control Protocol, Src Port: 39008 (39008), Dst Port: 80 (80), Seq: 1, Ack: 1, Len: 547
    Hypertext Transfer Protocol
    HTML Form URL Encoded: application/x-www-form-urlencoded
    Last edited by Mbded; 19th August 2015 at 09:16.

Similar Threads

  1. Send JSON & Key via HTTP POST
    By Poonarge in forum Newbie
    Replies: 3
    Last Post: 21st August 2014, 09:13
  2. Replies: 0
    Last Post: 12th June 2014, 12:37
  3. model/view json data displaying
    By binaural in forum Qt Programming
    Replies: 5
    Last Post: 27th June 2012, 08:13
  4. HTTP Post issue, HTML Works , QT Does Not,
    By georgeky in forum Newbie
    Replies: 8
    Last Post: 10th September 2011, 13:51
  5. Replies: 0
    Last Post: 10th September 2011, 13:38

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.