You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Connection::post() seems to send deformed data #181
I was experiencing some issues authenticating with the Reddit API using this client, so I tried to isolate the problem in a blank C++ file, and I believe it is because the library is sending deformed data to the server.
I have a simple test.cpp with the following contents:
...and I spun up a simple web server in Express.js that just repeats back what it receives with the following contents:
'use strict';constPORT=3000;constexpress=require("express");constapp=express();app.use(express.static('public'));app.use(express.urlencoded({extended: true}));app.post("/post",(req,res)=>{console.log(req.body)res.send({})})app.listen(PORT,()=>{console.log(`Server listening on port ${PORT}...`);});
I expected the Express server to print this:
Server listening on port 3000...
{ foo: 'bar' }
...which was generated by sending the following request with Python requests:
Activity