I am using the python package requests to make a get request to a server. My goal is to replicate certain known http requests and incorporated them into my python script. The original query string contains one key-value pair 'version=0%2E12' which I know is the url encoded equivalent of 'version=0.12'. Below is an example of what I am doing to replicate the http request.
params = {
'version'='0.12',
'language'='en',
...
}
resp = requests.get(url, params)
The resulting url query string has 'version=0.12' in it. If I try to change the setting of params to the following,
params = {
'version'='0%2E12',
'language'='en',
...
}
but the resulting query string contains 'version=0%252E31'. Essentially, requests is parsing the % to be url encoded.
How can I get requests to parse my params arguments with periods properly without manually writing the entire url?