I could be lost here (C/PHP/Node coder mainly in code I've used) Why is it a special case to track HTTP/s requests, that otherwise couldn't be logged like any other process/function? I'd guess most people use libcurl and you can wrap something around that. I guess I'm lost on why this is HTTP or Python specific, or if it is, fine.
Show HN: Httpdbg – A tool to trace the HTTP requests sent by your Python code
11–20 of 62 posts
Re: Show HN: Httpdbg – A tool to trace the HTTP requests sent by your Python code
#12Looks neat! A similar tool for this would be VCR (originally built in Ruby, but ported to other languages since): https://vcrpy.readthedocs.io/en/latest/ . This injects itself into the request pipeline, records the result in a local file which can then also be replayed later in tests. It's a quite nice approach when you want to write tests (or just explore) a highly complicated HTTP API without actually hitting it al…
Re: Show HN: Httpdbg – A tool to trace the HTTP requests sent by your Python code
#13I could be lost here (C/PHP/Node coder mainly in code I've used) Why is it a special case to track HTTP/s requests, that otherwise couldn't be logged like any other process/function? I'd guess most people use libcurl and you can wrap something around that. I guess I'm lost on why this is HTTP or Python specific, or if it is, fine.
I think the nice thing about HTTP for this is different parts of the stack can introduce default headers etc and it's helpful to be able to see the actual request after all that processing's been done.
Re: Show HN: Httpdbg – A tool to trace the HTTP requests sent by your Python code
#14I could be lost here (C/PHP/Node coder mainly in code I've used) Why is it a special case to track HTTP/s requests, that otherwise couldn't be logged like any other process/function? I'd guess most people use libcurl and you can wrap something around that. I guess I'm lost on why this is HTTP or Python specific, or if it is, fine.
Re: Show HN: Httpdbg – A tool to trace the HTTP requests sent by your Python code
#15I could be lost here (C/PHP/Node coder mainly in code I've used) Why is it a special case to track HTTP/s requests, that otherwise couldn't be logged like any other process/function? I'd guess most people use libcurl and you can wrap something around that. I guess I'm lost on why this is HTTP or Python specific, or if it is, fine.
Re: Show HN: Httpdbg – A tool to trace the HTTP requests sent by your Python code
#16I could be lost here (C/PHP/Node coder mainly in code I've used) Why is it a special case to track HTTP/s requests, that otherwise couldn't be logged like any other process/function? I'd guess most people use libcurl and you can wrap something around that. I guess I'm lost on why this is HTTP or Python specific, or if it is, fine.
Unlike other tools such as proxies that allow you to trace HTTP requests, httpdbg makes it possible to link the HTTP request to the Python code that initiated it. This is why it is specific to Python and does not work with other languages.
If you're coding something up, why wouldn't you know that piece of code does a HTTP/s request? Based on what you said, it sounds like a scenario where a programmer doesn't know how a request was made. Are there examples of scenarios where that's the case?
Sounds like a bit of a security nightmare where there's code doing arbitrary requests.
Re: Show HN: Httpdbg – A tool to trace the HTTP requests sent by your Python code
#17Looks neat! A similar tool for this would be VCR (originally built in Ruby, but ported to other languages since): https://vcrpy.readthedocs.io/en/latest/ . This injects itself into the request pipeline, records the result in a local file which can then also be replayed later in tests. It's a quite nice approach when you want to write tests (or just explore) a highly complicated HTTP API without actually hitting it al…
Re: Show HN: Httpdbg – A tool to trace the HTTP requests sent by your Python code
#18Looks neat! A similar tool for this would be VCR (originally built in Ruby, but ported to other languages since): https://vcrpy.readthedocs.io/en/latest/ . This injects itself into the request pipeline, records the result in a local file which can then also be replayed later in tests. It's a quite nice approach when you want to write tests (or just explore) a highly complicated HTTP API without actually hitting it al…
Re: Show HN: Httpdbg – A tool to trace the HTTP requests sent by your Python code
#19I could be lost here (C/PHP/Node coder mainly in code I've used) Why is it a special case to track HTTP/s requests, that otherwise couldn't be logged like any other process/function? I'd guess most people use libcurl and you can wrap something around that. I guess I'm lost on why this is HTTP or Python specific, or if it is, fine.
In the old days we'd use tcpdump and wireshark for this, but nowadays everything is encrypted up in the application layer so you need this kind of thing. Or tricky key dumping hacks.
Re: Show HN: Httpdbg – A tool to trace the HTTP requests sent by your Python code
#20Earlier quoted context omitted.
Unlike other tools such as proxies that allow you to trace HTTP requests, httpdbg makes it possible to link the HTTP request to the Python code that initiated it. This is why it is specific to Python and does not work with other languages.
I'm still not understanding. If you're coding something up, why wouldn't you know that piece of code does a HTTP/s request? Based on what you said, it sounds like a scenario where a programmer doesn't know how a request was made. Are there examples of scenarios where that's the case? Sounds like a bit of a security nightmare where there's code doing arbitrary requests.
Maybe you are generating HTTP requests through an API and need to see which headers it sets by default, or which headers are or are not getting set due to a misconfiguration or bug.
There are probably loads more use cases, and if I actually did programming for a living, I could probably list a lot more.