These are chat archives for codefellows/sea-b15-javascript

26th
Sep 2014
Chelsea Lura
@ChelseaLura
Sep 26 2014 00:29
Did I make it here first?
Kyle Warbis
@UWarbs
Sep 26 2014 00:30
yes
does it have the thursday night NFL game on tv as well as the UCLA vs ASU game? important!
Chelsea Lura
@ChelseaLura
Sep 26 2014 00:34
Uh I saw sports on tv
Kyle Warbis
@UWarbs
Sep 26 2014 00:35
woot
kevin-staiger
@kevin-staiger
Sep 26 2014 20:29
Hey my name's Kevin and I was in the last rails class and had an angular js question. I have a simple single page app that had a form where I have some simple client side validations. When I submit the form I need call a jenkins api and submit a post request. I dont really have any experience with RESTful apis so I am wondering the syntax of how my request should go i think it should be something like this
var request = $http({
method: "post",
url: "http://primer.aws.sb.karmalab.net:8080/api/json?pretty=true",
data { something}
});
does this look correct? also is my url just the link to the jenkins json api?
Kyle Warbis
@UWarbs
Sep 26 2014 20:34
$http.post('url', data)
actually that's within a service so it's a bit different
  $http.post('url', data)
    .success(function (data) {

    }).error(function (data) {
    });
Andy Ernst
@AndyCErnst
Sep 26 2014 20:37
Either method should work though right? The $http.post is just a shortcut for $http({ method: "post" etc.
Kyle Warbis
@UWarbs
Sep 26 2014 20:37
yes
nvm not different
anyway, looks like you got it.
kevin-staiger
@kevin-staiger
Sep 26 2014 20:42
ok great thanks a bunch, and thanks to hailey for directing me
Hailey L. Petway
@hlpetway
Sep 26 2014 21:34
Yay CodeFellows peeps! Come to the next happy hour @kevin-staiger