Title: delete multiple builds not working · Issue #37 · browserstack/api · GitHub
Open Graph Title: delete multiple builds not working · Issue #37 · browserstack/api
X Title: delete multiple builds not working · Issue #37 · browserstack/api
Description: 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 co...
Open Graph Description: 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 n...
X Description: 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 t...
Opengraph URL: https://github.com/browserstack/api/issues/37
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"delete multiple builds not working","articleBody":"When I use the curl example from the docs it works without any problem\r\n```bash\r\ncurl -u \"xxxx:xxxx\" -X DELETE \"https://api.browserstack.com/automate/builds?buildId=xxxx\"\r\n```\r\n\r\nbut when I try to do the same with node I always get a 302 redirect error\r\n```javascript\r\nconst request = require('request')\r\n\r\nrequest({\r\n\turl: 'https://api.browserstack.com/automate/builds?buildId=xxxx',\r\n\tmethod: 'DELETE',\r\n\tauth: {\r\n\t\tuser: 'xxxx',\r\n\t\tpass: 'xxxx'\r\n\t}\r\n}, (err, res, body) =\u003e {\r\n\tif (res.statusCode === 201) {\r\n\t\tconsole.log('success')\r\n\t} else {\r\n\t\tconsole.log('error: ' + res.statusCode)\r\n\t\tconsole.log(body)\r\n\t}\r\n})\r\n```\r\nthe code above logs\r\n```\r\nerror: 302\r\n\u003chtml\u003e\u003cbody\u003eYou are being \u003ca href=\"https://api.browserstack.com/users/sign_in\"\u003eredirected\u003c/a\u003e.\u003c/body\u003e\u003c/html\u003e\r\n```\r\n\r\nWhen I modify the code to e.g. change the status of a session it works.\r\n```javascript\r\nrequest({\r\n\turl: `https://api.browserstack.com/automate/sessions/xxxx.json`,\r\n\tmethod: 'PUT',\r\n\theaders: {\r\n\t\t'Content-Type': 'application/json'\r\n\t},\r\n\tbody: `{\"status\":\"error\"}`,\r\n\tauth: {\r\n\t\tuser: 'xxxx',\r\n\t\tpass: 'xxxx'\r\n\t}\r\n})\r\n```\r\n\r\nIs there any internal difference I need to consider when trying to modify multiple items?\r\nI really have no idea what's wrong with the node code :/","author":{"url":"https://github.com/SassNinja","@type":"Person","name":"SassNinja"},"datePublished":"2019-08-29T15:16:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/37/api/issues/37"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:37d683c7-e453-f558-dfee-6ae5caa460d5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A6F2:179CB9:717279A:93EBD60:696D9D2B |
| html-safe-nonce | fb2c9b742f19f6778a9eaae870cab2e74022e4f9bca67f2a5311372213a77bdb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNkYyOjE3OUNCOTo3MTcyNzlBOjkzRUJENjA6Njk2RDlEMkIiLCJ2aXNpdG9yX2lkIjoiNjU0NTI5NTQxMzg3OTUxNDAzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e3a1f590e4fb98930569d7beaa0423a433de76ce8ef702013c0b54a0dc34a426 |
| hovercard-subject-tag | issue:487022483 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/browserstack/api/37/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ae22e04ec80d79eeaf96fe9a6272b4c807ca6aff1239a6cdeac19557b77fbbc6/browserstack/api/issues/37 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ae22e04ec80d79eeaf96fe9a6272b4c807ca6aff1239a6cdeac19557b77fbbc6/browserstack/api/issues/37 |
| og:image:alt | 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 n... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SassNinja |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4922b452d03cd8dbce479d866a11bc25b59ef6ee2da23aa9b0ddefa6bd4d0064 |
| turbo-cache-control | no-preview |
| go-import | github.com/browserstack/api git https://github.com/browserstack/api.git |
| octolytics-dimension-user_id | 1119453 |
| octolytics-dimension-user_login | browserstack |
| octolytics-dimension-repository_id | 2555313 |
| octolytics-dimension-repository_nwo | browserstack/api |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 2555313 |
| octolytics-dimension-repository_network_root_nwo | browserstack/api |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7e5ae23c70136152637ceee8d6faceb35596ec46 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width