Shop OBEX P1 Docs P2 Docs Learn Events
How do you view the Post and Get Headers being sent to the Spinneret? — Parallax Forums

How do you view the Post and Get Headers being sent to the Spinneret?

highplainsbubbahighplainsbubba Posts: 34
edited 2011-12-14 12:57 in Accessories
I am using Notepad to edit the HTML files on my SD card in the Spinneret. In the Servebeer tutorials the actual GET and POST headers are displayed for viewing. I would like to see what variables are being sent /received by the Spinneret in the HTML headers. Is there a way of doing this without an HTML editor? How do you display these headers ?

Comments

  • Mike GMike G Posts: 2,702
    edited 2011-12-13 20:40
    In Main method of HTTPServer find Request.InitializeRequest(id, @rxdata). Right below there is a commented line pst.str(@rxdata). Uncomment the line...

    Before
          Request.InitializeRequest(id, @rxdata)
          'pst.str(@rxdata)
    

    After
          Request.InitializeRequest(id, @rxdata)
          pst.str(@rxdata)
    

    This is will display the request header coming in to the Spinneret.

    There are many applications that allow viewing of request/response headers for debugging. I use the HttpFox plugin for FireFox for simple stuff. Fiddler is very useful too.
  • highplainsbubbahighplainsbubba Posts: 34
    edited 2011-12-14 12:57
    Beautiful, the pst.str(@rxdata) was missing in my file, but I added it, and uncommented it and was able to follow the headers on Serial Term. I also tried the HTTP Fox and it too worked great. For those newbies like myself, you can install HTTP Fox in the Firefox browser by going to add-ons, and searching for HTTP Fox. After install, you can access it through the Firefox button and "Web Developer". You can see the headers, querie strings, and content in the window. You have to start it with the start button first. Thanks again for the help Mike.
Sign In or Register to comment.