-
Notifications
You must be signed in to change notification settings - Fork 33
301/302 Redirects, FormData files, Cookies, Token authentication #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
FoamyGuy
merged 25 commits into
adafruit:main
from
michalpokusa:redirect-301-302-token-form-files-cookies
Sep 8, 2023
Merged
301/302 Redirects, FormData files, Cookies, Token authentication #67
FoamyGuy
merged 25 commits into
adafruit:main
from
michalpokusa:redirect-301-302-token-form-files-cookies
Sep 8, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
temp to docs
…quest header part
8edcd1b to
8c16b27
Compare
6858cef to
4ec080e
Compare
FoamyGuy
approved these changes
Sep 2, 2023
Contributor
FoamyGuy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
I tested as much of the new features and fixes as I could on a combination of Metro S3, and Feather S3 TFT both on 9.0.0 latest release from S3.
Thank you for all of the improvements!
Contributor
Author
adafruit-adabot
added a commit
to adafruit/Adafruit_CircuitPython_Bundle
that referenced
this pull request
Sep 8, 2023
Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 6.0.1 from 6.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#181 from dhalbert/remove-wsgiserver-completely Updating https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display to 3.12.1 from 3.12.0: > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#115 from kattni/eyespi-beret Updating https://github.com/adafruit/Adafruit_CircuitPython_HID to 5.4.0 from 5.3.6: > Merge pull request adafruit/Adafruit_CircuitPython_HID#116 from michalpokusa/layout-write-delay Updating https://github.com/adafruit/Adafruit_CircuitPython_HTTPServer to 4.4.0 from 4.3.0: > Merge pull request adafruit/Adafruit_CircuitPython_HTTPServer#67 from michalpokusa/redirect-301-302-token-form-files-cookies Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Updated download stats for the libraries
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Despite multiple new features, the overall API itself didn't change much. I believe theese changes, if it comes to that, should be released as 4.x.0 and not 5.0.0.
⭐ Added:
Tokenauthentication class, works the same way asBearer, but with "Token ..." prefixMOVED_PERMANENTLY_301andFOUND_302StatusobjectsHeadersgot new methods:get_directive()andget_parameter(),addandsetRequest.cookiesfor retrieving andcookiesparameter for setting in allResponse-like classesrequest.form_data.filesthat uses newFilesandFileclasses for representing files uploaded usingmultipart/form-data🪛Fixes:
tupleas possibleRoute.methodsparameter type, changed typing fromUniontoIterator🛠️ Updated/Changed:
Redirectgot newpreserve_methodparameter, which allows it to switch between301,302,307and308Redirectgot newstatusparameter, which allow for manual status code settingRedirecte.g.
192.168.0.103 -- "GET /index.html" 242 -- "200 OK" 154 -- 182msFormDataQueryParams,FormDataandHeaders, especially inget()andget_list()Server.serve_forevernow acceptspoll_intervalparameter which adds delay between calling.poll()FormData.__init__()for edge cases, e.g. when there is noContent-Typeheader inPOSTrequestRequest.json()can now be accessed inPUT,PATCHandDELETErequests🏗️ Refactor:
_IFieldStoragetointerfaces.py, also added_IXSSSafeFieldStorageversion of interface that enables encoding HTML entitiesQueryParamsandFormDataimplement_IXSSSafeFieldStorageHeadersnow implements_IFieldStorageand does not store original case of header names, functionally it is the samemultipart/form-dataform dataI hope I included everything.