We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I use the curl example from the docs it works without any problem
curl -u "xxxx:xxxx" -X DELETE "https://api.browserstack.com/automate/builds?buildId=xxxx"
but when I try to do the same with node I always get a 302 redirect error
const request = require('request') request({ url: 'https://api.browserstack.com/automate/builds?buildId=xxxx', method: 'DELETE', auth: { user: 'xxxx', pass: 'xxxx' } }, (err, res, body) => { if (res.statusCode === 201) { console.log('success') } else { console.log('error: ' + res.statusCode) console.log(body) } })
the code above logs
error: 302 <html><body>You are being <a href="https://api.browserstack.com/users/sign_in">redirected</a>.</body></html>
When I modify the code to e.g. change the status of a session it works.
request({ url: `https://api.browserstack.com/automate/sessions/xxxx.json`, method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: `{"status":"error"}`, auth: { user: 'xxxx', pass: 'xxxx' } })
Is there any internal difference I need to consider when trying to modify multiple items? I really have no idea what's wrong with the node code :/
The text was updated successfully, but these errors were encountered:
Hi @SassNinja,
We are working on updating few things at the back. Meanwhile, add the following Accept header to make it work.
{ url: 'https://api.browserstack.com/automate/builds?buildId=xxxx', method: 'DELETE', headers: { "Accept": "application/json" }, auth: { user: username, pass: password } }
Let me know if you still face any issue.
Thanks for reaching out. ~ Rohan Chougule
Sorry, something went wrong.
No branches or pull requests
When I use the curl example from the docs it works without any problem
but when I try to do the same with node I always get a 302 redirect error
the code above logs
When I modify the code to e.g. change the status of a session it works.
Is there any internal difference I need to consider when trying to modify multiple items?
I really have no idea what's wrong with the node code :/
The text was updated successfully, but these errors were encountered: