Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. var ops = [
  2. {
  3. path: "/fields/System.Title",
  4. op: "add",
  5. value: "Hello world"
  6. }
  7. ];
  8.  
  9. var options = {
  10. url: 'http://localhost:8080/tfs/DefaultCollection/Agile Git/_apis/wit/workItems/$Bug?api-version=2.2',
  11. username: 'username',
  12. password: 'password',
  13. domain: 'domain',
  14. method: 'PATCH',
  15. headers: {
  16. 'Content-Type': 'application/json-patch+json'
  17. },
  18. body: JSON.stringify(ops)
  19. };
  20.  
  21. httpntlm.patch(options, function(err,res) {
  22. console.log("patch complete");
  23. console.log(res.body);
  24. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement