Rework HTTPPost into HTTPReq
With the current approach support for HTTP PUT, GET, etc. would all need another packet type in order to be supported. The module will at least require additional support for PUT for sending new device announcements.
I think it would be best to merge all of the potential packet types into one, where the rest of the information is left in the details field. For example the details field for a HTTPReq
packet for uploading device keys would look like this: POST /_matrix/client/unstable/keys/upload
.
Essentially the details field would be formatted exactly like in the Matrix documentation, which is a good in itself already.
Apply in:
-
Documentation (will be part of !2 (merged)) -
Code