Closed shmargum closed 4 years ago
Just leaving an explanation behind this PR:
We need to be able to send authenticated requests with a JSON (string) payload, with the correct header application/json
For the correct oauth headers, we must not include the JSON payload in the signature.
In order to get the underlying HTTP client to send the proper application/json header, we need to send the options under the key :json
: https://github.com/httprb/http/blob/d09394c5dcf9cc28b4858a78dc071091bcce4b54/lib/http/client.rb#L176
@sferik hoping you can have a look at this
I can confirm this allows me to create welcome messages easily!
@shmargum @sferik Any movement on getting this merged? I believe that the old DM endpoints will cease to work on June 19th. Not long!
FWIW the pull request is missing a put equivalent (I added a PR for it) https://github.com/shmargum/twitter/pull/1
@shmargum I recently merged https://github.com/sferik/twitter/pull/927. Does this solve your problem? If so, can this PR be closed?
This adds basic support for sending authenticated JSON post requests. Resolves #862 Also resolves #869
Example usage: