• Post Reply Bookmark Topic Watch Topic
  • New Topic

HTTP object?  RSS feed

 
Finn MacCool
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a class that can take a string of a http request and turn it into a http object whereby you can get access to all of the individual header fields and the body of the request? I am mainly concerned with the header fields though.
[ May 29, 2006: Message edited by: Finn MacCool ]
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not that I'm aware of. This is pretty easy, though. If you process one line at a time:

Some examples:
 
Finn MacCool
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Stan, I've just knocked this up roughly and was wondering if you could maybe take a peek and give me some feedback. If there is a cleaner way of doing some of things I've done, could you please let me know?

 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cool, though it would be simpler to use HttpClient from Jakarta
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!