Doc'd HttpResponse.cookies.#17250
Merged
felixxm merged 1 commit intodjango:mainfrom Sep 14, 2023
mij:document-HttpResponse.cookies
Merged
Doc'd HttpResponse.cookies.#17250felixxm merged 1 commit intodjango:mainfrom mij:document-HttpResponse.cookies
felixxm merged 1 commit intodjango:mainfrom
mij:document-HttpResponse.cookies
Conversation
MarkusH
approved these changes
Sep 12, 2023
Contributor
Probably a separate discussion to have on the forum. One could argue that there are no other attributes in allcaps on response so there's no precedent 🤷♂️ |
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
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.
This PR documents attribute
HttpRequest.cookies.HttpResponse.set_cookie(), making cookies controllable but not observableHttpResponse.headersandHttpResponse.items()interfaces (noSet-Cookie)httpOnlycookies for authentication.This PR was solicited in IRC, and its content got a superficial review there. It does the following:
HttpResponse.cookiesin the "Request and response objects" page.Set-Cookieheaders are omitted fromHttpResponse.headersAs a side note, the current code is asymmetric:
HttpRequestuses attributeHttpRequest.COOKIES, butHttpResponseusesHttpResponse.cookies. A perfectionist with deadlines might alias the existingHttpResponse.cookiestoHttpResponse.COOKIESand document the latter – so both interfaces are symmetric and intuitive.Comments welcome.