Skip to content

Commit 4fba5ea

Browse files
Support form data for PUTs
1 parent b6a95f3 commit 4fba5ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_httpserver/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ def form_data(self) -> Union[FormData, None]:
418418
request.form_data["foo"] # "bar"
419419
request.form_data.get_list("baz") # ["qux"]
420420
"""
421-
if self._form_data is None and self.method == "POST":
421+
if self._form_data is None and (self.method == "POST" or self.method == "PUT"):
422422
self._form_data = FormData(self.body, self.headers, debug=self.server.debug)
423423
return self._form_data
424424

0 commit comments

Comments
 (0)