psf / requests

A simple, yet elegant, HTTP library.

Home Page:https://requests.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`params` might be misnamed?

Matthew1471 opened this issue · comments

Summary

Being a bit pedantic but isn't it that the parameters of a URL are a ";" affair inside the path e.g. https://example.com/document;language=english?documentID=5 (RFC source and summary) and what Requests calls params is actually the query.. which I long have been calling the "querystring" thanks to my days of Classic ASP programming referencing the "query string" (https://www.w3schools.com/asp/coll_querystring.asp and https://en.wikipedia.org/wiki/Query_string).

Documentation calls them part of the query string too.

What you expected

Good question, maybe the keyword to be query? But I highly doubt there will be any aspiration to start renaming the library's keywords at this late stage in a way that would cause a breaking change (unless both were accepted and one was mapped to the other). Validation I guess that I am right (or a correction if I am wrong)?

Parameters is another common name for the parsed (not encoded) pieces of the query string. params are meant to be passed as a native python object (e.g., dictionary of string to string, sequence of tuples of length 2, etc). So if you parsed a query string into parameters on the server side, the client side would take parameters and encode them into the query string

Edit to add:

None of this is to say you're wrong and we're right, just that it's not uncommon for the query string to be called query parameters or parameters for short