Comments (3)
The libraries do not work identically, but I don't think you have provided enough information to find the mistake with your aiohttp code.
For example, passing a str as a URL will encode/escape the URL, which could be one cause (e.g. if you have query parameters, you should pass them in the params argument, or pass a pre-encoded yarl.URL rather than str).
from aiohttp.
I just figured out what the issue is with mitmproxy.
async with self.aioss.post(
url,
params=self.params,
headers=headers,
data=json.dumps(payload)
was not properly encoding the URL. I had also tried
url = url + "?" + urlencode(self.device.params)
but I didn't realize I had to use yarl to mark it as encoded
url = url + "?" + urlencode(self.device.params)
url = yarl.URL(url, encoded=True)
This works now.
from aiohttp.
url = url + "?" + urlencode(self.device.params)
In this case, it'd probably make sense to pass them to the params argument, rather than constructing the URL yourself.
from aiohttp.
Related Issues (20)
- `FileResponse` has undefined behavior if the file is changed out from under it between the `stat` and `open` calls
- ClientSession timeout AttributeError
- Addition of 'loop' Parameter Description in web.run_app Documentation HOT 3
- Cannot build wheels for aiohttp HOT 1
- Form-encoded data with None as the value gets passed as string "None" HOT 5
- CVE-2023-49081/2 fix question HOT 12
- Wrong constructor called HOT 3
- Make a protocol ValueError subclass ClientError HOT 2
- Serve static Brotli compressed files
- HTTPS requests received on HTTP port show generic BadStatusLine exception HOT 1
- aiohttp may respond to requests sent after the client asks for the connection to be closed
- ValueError: verify_ssl, ssl_context, fingerprint and ssl parameters are mutually exclusive HOT 2
- Accept-Encoding header parsing and interpretation HOT 15
- Varying node versions & not using NPM clean install
- aiodns can probably be enabled on windows, now that it ships with c-ares already built HOT 3
- Failure introduced from 3.8.5 --> 3.8.6; Passing on 3.9+ HOT 4
- Detailed TimeoutError message not captured when handling asyncio.TimeoutError in aiohttp HOT 8
- after upgrading from 3.8.6 to 3.9.* can't use middlewares anymore HOT 3
- Abrupt client websocket connection loss results in `close_code = OK` HOT 2
- Python package aiohttp>=3.9.2 break azure-keyvault-certificates package's get_certificate functionality HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiohttp.