Feli Goldstein (moved) utilise witches.town. Vous pouvez læ suivre et interagir si vous possédez un compte quelque part dans le "fediverse".

I just audibly shouted "PISS OFF" at my monitor after looking up how to include JSON in POST requests in urllib2, and seeing answers that keep recommending another fucking library. 😡

@TrollDecker is it enough to just put the json string (json.dumps) in the urlopen data parameter?

@impiaaa Yeah, but I needed to remember how to do the putting part. :blobtongue:

I think I've finally found the answer, though.

Feli Goldstein (moved) @feli

@TrollDecker @impiaaa you need to know the POST parameter, then hand a dictionary to urlencode() which you hand in as data argument: data=urlencode({'param': jsondata})

I think