Help me understand
so, im trying to complete codecrafters challenge 'build your own http server'.
And I was doing task 'Respond with 200' where i needed to just return 200 code to the client, but it didnt work. After some research I found out that I need to read request data before making a response, but why?
7 Replies
https://www.youtube.com/watch?v=7GBlCinu9yg
This is a great video, I suggest you watch it
Computerphile
YouTube
Coding a Web Server in 25 Lines - Computerphile
Just how simple can a web server be? Laurence Tratt, Shopify / Royal Academy of Engineering Research Chair in Language Engineering at Kings College London builds it up.
More about Laurie: https://bit.ly/C_LaurenceTratt
https://www.facebook.com/computerphile
https://twitter.com/computer_phile
This video was filmed and edited by Sean Riley.
...
He does not use C# but Rust, however the logic and reasoning remains the same
he explains that reading stuff?
Computerphile is very educational
Oh, I see.
I misread your question.
You must read it because it is just a single stream of bytes.
There aren't two channels like Send and Receive.
so when Im reading and then writing Im actually just appending my response to that channel? So it now contains both request and response?
From what I have understood, yes.