-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to client.droplets.deleteByTag #34
Comments
Interesting - maybe they changed things so that bodies in DELETEs are no
longer valid. We’d need to update the params passed to makeRequestWithBody
from deleteByTag.
…On Mon, Mar 2, 2020 at 8:41 AM Ronald Perrella ***@***.***> wrote:
Hi,
I've used this package for years and I love it. Recently, however, it
appears that client.droplets.deleteByTag() doesn't work. When I put a debug
statement (console.log) in client.js, In _makeRequestWithBody, I can see
that it builds this object:
{ uri: 'https://api.digitalocean.com/v2/droplets',
method: 'DELETE',
headers:
{ Authorization:
'Bearer bla bla bla' },
body: '{"tag_name":"GH"}' }
If I understand the DigitalOcean API correctly, I think the tag_name needs
to be part of the URI, not part of the body. However, I'm not sure how to
correct this.
Thanks.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#34?email_source=notifications&email_token=AAAXCKJA3QPFIEE26QTMGN3RFOZPXA5CNFSM4K7UQA7KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IRWI34Q>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAXCKLMRJHUQBRE6HWX4BTRFOZPXANCNFSM4K7UQA7A>
.
|
I don't call this API very often but it certainly used to work (say, a year ago?) |
Sorry my bad - closed accidentally. |
Do you accept PRs? |
Yup! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I've used this package for years and I love it. Recently, however, it appears that client.droplets.deleteByTag() doesn't work. When I put a debug statement (console.log) in client.js, in _makeRequestWithBody, I can see that it builds this object:
{ uri: 'https://api.digitalocean.com/v2/droplets',
method: 'DELETE',
headers:
{ Authorization:
'Bearer bla bla bla' },
body: '{"tag_name":"GH"}' }
In the DigitalOcean API docs I see:
To delete Droplets by a tag (for example awesome), send a DELETE request to v2/droplets?tag_name=$TAG_NAME.
So, If I understand the DigitalOcean API correctly, I think the tag_name needs to be part of the URI, not part of the body. However, I'm not sure how to correct this.
Thanks.
The text was updated successfully, but these errors were encountered: