Creating A Web Server To Handle GET / POST Requests With Python

preview_player
Показать описание
Hi guys,

In this video we are going to take the server forward by adding new GET and POST request functionality in order to build a functioning task list.

You will be able to add new tasks and remove existing tasks.

Here is a link to the Stack Overflow query i used in the video:

Please message or leave a comment if you have any questions and I will try by best to answer.

Thank you for watching guys.

Conor
Рекомендации по теме
Комментарии
Автор

Wow. It's interesting (not to mention frustrating) to get most examples end up trying to compute orbital mechanics for a solar system. This guy took it to it's most simplest point, which, in traditional terms, is called teaching, that is, teaching by explanation. Using the principles (and actual coding) that this guy presents, I can take it and play with it and expand it and generally actually fricking learn from it. Excellent vid!

qqktesj
Автор

really appreciate this extensive demo, thank you!

Stewty
Автор

Following on from last video, this is really helpful in my attempt to build a pure python api. I'm going to look at your vid catalog, but if you don't have it already, plugging this into a simple local sqlite db (or similar) would be extremely handy as well! Thanks again!

PatrickCollins
Автор

Thanks man, that was extremely helpful for me, I do all that stuff in PHP, but i need to learn it in Python. You just help set me on the right path. Thank you so very much .. I also subscribed to your channel!!
and btw, framewroks are ok, but this shows you the basics, cuz i already know django, but i have no idea, what it's really doing, till i came across your video.

peterm
Автор

Nice work Conor, thanks for the great content from Chris Bailey (in Dorset, in case we're related)

Chris-oqty
Автор

Excellent example. Few problems but at the end managed to solve the issues. It wasn't able to append bytes so I've had to convert bytes to string by adding
anyway, I'm not a python programmer actually so it wasn't obvious. Will carry on with it as I'm seriously interested in this language. Thanks a lot.

DrOne-swoz
Автор

thank you so much. Really appreciate this tutorial

gszpdmv
Автор

Thank you so much, This video save my life!!!.

chaipak
Автор

very good exemple. Nice to see it live with bug and fixes. :) I am not so bad after all

richarddesrochers
Автор

The reason for the error that kept persisting is due to the difference between .append() & .extend(). Appending takes the list task 4 & appends it to tasklist whereas using extend in that place would have taken the string value inside the list and extended it as it is. tasklist.append(new_task[0]) is a good solution since only list is coming at a time though

CuriouslyWatching
Автор

I need your help to do the "HTTP server which is waiting for HTTP Post request. These requests then proceed with string masks and parameters for LED and Display control are flirting. Then ESP turns on / off a certain LED and shows a number or string on Display.
please help with how to start with.

kiranghatge
Автор

I'm having a issue with displaying images, the image never loads in when using an <img> tag even though a get request is send.
It works when hosting the web server with the http.server module but not with this.
I'm guessing it has something to do with the mime type and the encoding process but I'm not sure how to fix it

theplasmaistplasma
Автор

I have a html file with embedded javascript. I tried to copy+paste it into my .py file into the "output" variable like in 7:40 in the video. The problem I get is that only the html part works, while the javascript part doesn't work. How can I make the javascript code work through GET request? Or should I do it in a different way?

BookofYAH
Автор

Every time I try to run it works fine but when I open the local host it throws an error and it seas "requestHandler' object has no attribute 'send_respond"

efobust
Автор

Great video! How easy/difficult would it be, to make that server accessable from the lokal network?

markusstaden
Автор

Hi Conor. When i try to run demo your code. i have some mistake is :
when i want to remove one task on webserver and it announced error =>
This page is currently not active -"ERR_EMPTY_RESPONSE" . so how to fix this problem ? thank you !

vietdungnguyen
Автор

may, i ask whats the difference between BaseHTTPRequestHandler and SimpleHTTPRequestHandler and CGIHTTPRequestHandler

legendofakuma
Автор

My redirect isn't redirecting. Getting a black screen in chrome saying this has permanently been moved

fatherchaos
Автор

how to attach image with each task bro

tranquangtruong
Автор

Please reply Why you are getting task%201 instead of task 1

MadhuKumar-hiqs
welcome to shbcf.ru