Skip to content

Support json payload body #347

@seppo0010

Description

@seppo0010

To add alt text to an image the request must be a json object:

https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/api-reference/post-media-metadata-create

I think a small tweak in the __request method could do it, but I'm not sure

node-twitter/lib/twitter.js

Lines 136 to 143 in 296e82e

if (method === 'post') {
var formKey = 'form';
if (typeof params.media !== 'undefined') {
formKey = 'formData';
}
options[formKey] = params;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions