[10:35:51] !help [10:36:35] With? [10:36:53] https://wm-bot.wmflabs.org/libera_logs/%23mediawiki-core/20210731.txt [10:37:10] Let's answer in #mediawiki-core [13:16:33] RhinosF1 no luck [13:45:16] !help [14:23:11] I got 411 length required [15:06:18] I tried several times, urlencode method works but no luck with json post [15:06:30] But I have to post json data [15:06:40] !help [15:08:01] I used the following [15:08:03] curl -v -X POST -c 'cookies.txt' -b 'cookies.txt' -H 'Content-Type: application/json' --data '{"action":"login","lgname":"Nokib Sarkar","lgpassword":"MyPass","lgtoken":"d03b........bbh+\\","format":"json"}' https://bn.wikipedia.org/w/api.php [15:08:46] Why are you doing it with curl? There's gotta be better ways [15:08:50] But also, there's examples https://www.mediawiki.org/wiki/API:Client_code/Bash [15:09:52] For some reason, I have to do so [15:15:44] There is no example of posting json [15:16:29] The c++ library is dependent on Qt [15:16:38] Which I cannot use [15:17:29] Reedy [15:19:24] which c++ library? [15:20:02] libmediawiki or something Ig [15:21:05] https://www.mediawiki.org/wiki/API:Client_code/Bash does this basically as all CLI [15:22:02] Yeah [15:22:24] Reedy But it doesn't post json [15:22:31] Why does it need to? [15:22:36] It post only url-encode [15:22:55] If your data is already json encoded [15:23:46] I want to know if mediawiki API doesn't accept JSON encoded format [15:24:32] Because if I change the URL to https://httpbin.org/post, it shows that the posted data is properly accepted as JSON [15:25:26] Reedy [15:25:48] I think either there is some bug or I am doing wrong [15:26:07] I wonder if there is some hidden requirement [15:27:52] It should work, because other tools/libraries definitely send json blobs [15:28:34] You should test it out [15:28:53] I've got many other things I can be doing ;) [15:29:44] Ok [15:29:46] Np [15:30:24] But Actually, I said so because it should return an error [15:30:29] You can certainly file a bug [15:30:43] Post your example code etc [15:30:46] Json encoded [15:31:52] I am testing at paws [15:32:23] Wikimedia cloud [15:34:30] The same pinch [16:03:20] Is 411 length required not self explanatory