Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> because if you are making an HTTP server, then yea stuff is going to be calling you.

Not necessarily. You could write the

  while True:
    request = getNextRequest()
    ...
yourself. A web server library would have functions for parsing headers, creating http responses, handling cookies, generating html, etc., and could have data structures that make it easier to dispatch requests to individual handlers, but your code would be in the driving seat as to what gets called.

Also a web framework could call a function to extract an URL from an incoming http request without any involvement of code you write.

A framework provides a main method; a library doesn’t.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: