title: Delete Request In a Directory HTTP Server Python
body: <p>I was looking at this <a href="https://github.com/ImaginaryBIT/Python_HTTP_Server" rel="nofollow noreferrer">https://github.com/ImaginaryBIT/Python_HTTP_Server</a>. It is a website with a directory that allows you to get, put, and post files to/from the directory. I am trying to modify it to have a delete request. I am having some trouble with what to do exactly. I have looked at some other Stack Overflow posts and they say that you have to use JavaScript for a delete request in the form that I was trying to use. I am not sure how true that is. I was trying to use only python/html.</p>
  <pre><code>line 154        f.write(b&quot;&lt;form ENCTYPE=\&quot;multipart/form-data\&quot; method=\&quot;post\&quot;&gt;&quot;)
  line 155        f.write(b&quot;&lt;input name=\&quot;file\&quot; type=\&quot;file\&quot;/&gt;&quot;)
  line 156        f.write(b&quot;&lt;input type=\&quot;submit\&quot; value=\&quot;upload\&quot;/&gt;&lt;/form&gt;\n&quot;) 
  </code></pre>
  <p>I was trying to use this format because it creates the buttons in the picture
  <a href="https://i.stack.imgur.com/OOPxi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OOPxi.png" alt="Server UI" /></a></p>
  <p>I was trying to do something similar with the delete. Choose and file to delete and hit another button called delete. I would prefer if the user is somehow limited to choosing a file in the directory I have seen the requests.delete in python that has something to do something with JSON, but I don't know if that would be relevant to what I'm trying to do.</p>