<feed xmlns='http://www.w3.org/2005/Atom'>
<title>angular.js/test/ngResource, branch v1.2.0rc1</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/'/>
<entry>
<title>style(minerr): prefer component name as namespace</title>
<updated>2013-08-09T21:12:04+00:00</updated>
<author>
<name>Ken Sheedlo</name>
</author>
<published>2013-08-09T18:14:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=45dc9ee7b4a1e004f9fb7edde41d4805d1402ffa'/>
<id>45dc9ee7b4a1e004f9fb7edde41d4805d1402ffa</id>
<content type='text'>
Closes #3527
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #3527
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(resource): check whether response matches action.isArray</title>
<updated>2013-07-31T20:17:37+00:00</updated>
<author>
<name>Pete Bacon Darwin</name>
</author>
<published>2013-07-30T21:48:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=a644ca7b4e6ba84a467bcabed8f99386eda7fb14'/>
<id>a644ca7b4e6ba84a467bcabed8f99386eda7fb14</id>
<content type='text'>
When using $resource you must setup your actions carefully based on what the server returns.
If the server responds to a request with an array then you must configure the action with
`isArray:true` and vice versa.  The built-in `get` action defaults to `isArray:false` and the
`query` action defaults to `isArray:true`, which is must be changed if the server does not do this.
Before the error message was an exception inside angular.copy, which didn't explain what the
real problem was. Rather than changing the way that angular.copy works, this change ensures that
a better error message is provided to the programmer if they do not set up their resource actions
correctly.

Closes #2255, #1044
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using $resource you must setup your actions carefully based on what the server returns.
If the server responds to a request with an array then you must configure the action with
`isArray:true` and vice versa.  The built-in `get` action defaults to `isArray:false` and the
`query` action defaults to `isArray:true`, which is must be changed if the server does not do this.
Before the error message was an exception inside angular.copy, which didn't explain what the
real problem was. Rather than changing the way that angular.copy works, this change ensures that
a better error message is provided to the programmer if they do not set up their resource actions
correctly.

Closes #2255, #1044
</pre>
</div>
</content>
</entry>
<entry>
<title>feat($resource): support an unescaped URL port</title>
<updated>2013-07-12T09:47:46+00:00</updated>
<author>
<name>Leandro Ostera</name>
</author>
<published>2013-05-14T05:41:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=b94ca12fa0b027d8592f5717e038b7b116c59384'/>
<id>b94ca12fa0b027d8592f5717e038b7b116c59384</id>
<content type='text'>
The colon character is used to identify parameters in $resource.
This meant that we had to escape the colon used in a port.
It turns out that this is not necessary if we assume that parameter
names cannot consist of only digits.
If the parameter consists only of numbers, then it's a port.

Closes #2778
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The colon character is used to identify parameters in $resource.
This meant that we had to escape the colon used in a port.
It turns out that this is not necessary if we assume that parameter
names cannot consist of only digits.
If the parameter consists only of numbers, then it's a port.

Closes #2778
</pre>
</div>
</content>
</entry>
<entry>
<title>feat($resource): expose promise instead of only $then</title>
<updated>2013-05-23T21:18:29+00:00</updated>
<author>
<name>Alexander Shtuchkin</name>
</author>
<published>2013-04-16T22:08:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=05772e15fbecfdc63d4977e2e8839d8b95d6a92d'/>
<id>05772e15fbecfdc63d4977e2e8839d8b95d6a92d</id>
<content type='text'>
- Instance or collection have `$promise` property which is the initial promise.
- Add per-action `interceptor`, which has access to entire $http response object.

BREAKING CHANGE: resource instance does not have `$then` function anymore.

Before:

Resource.query().$then(callback);

After:

Resource.query().$promise.then(callback);

BREAKING CHANGE: instance methods return the promise rather than the instance itself.

Before:

resource.$save().chaining = true;

After:

resource.$save();
resourve.chaining = true;

BREAKING CHANGE: On success, promise is resolved with the resource instance rather than http
response object.

Use interceptor to access the http response object.

Before:

Resource.query().$then(function(response) {...});

After:

var Resource = $resource('/url', {}, {
  get: {
    method: 'get',
    interceptor: {
      response: function(response) {
        // expose response
        return response;
      }
    }
  }
});
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Instance or collection have `$promise` property which is the initial promise.
- Add per-action `interceptor`, which has access to entire $http response object.

BREAKING CHANGE: resource instance does not have `$then` function anymore.

Before:

Resource.query().$then(callback);

After:

Resource.query().$promise.then(callback);

BREAKING CHANGE: instance methods return the promise rather than the instance itself.

Before:

resource.$save().chaining = true;

After:

resource.$save();
resourve.chaining = true;

BREAKING CHANGE: On success, promise is resolved with the resource instance rather than http
response object.

Use interceptor to access the http response object.

Before:

Resource.query().$then(function(response) {...});

After:

var Resource = $resource('/url', {}, {
  get: {
    method: 'get',
    interceptor: {
      response: function(response) {
        // expose response
        return response;
      }
    }
  }
});
</pre>
</div>
</content>
</entry>
<entry>
<title>fix($resource): null default param results in TypeError</title>
<updated>2013-05-16T21:26:08+00:00</updated>
<author>
<name>Ryan Schumacher</name>
</author>
<published>2013-04-03T15:40:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=cefbcd470d4c9020cc3487b2326d45058ef831e2'/>
<id>cefbcd470d4c9020cc3487b2326d45058ef831e2</id>
<content type='text'>
Fixes issue when setting a default param as `null` error
`TypeError: Cannot read property 'charAt' of null`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes issue when setting a default param as `null` error
`TypeError: Cannot read property 'charAt' of null`
</pre>
</div>
</content>
</entry>
<entry>
<title>feat($resource): collapse empty suffix parameters correctly</title>
<updated>2013-05-14T19:01:15+00:00</updated>
<author>
<name>Glenn Goodrich</name>
</author>
<published>2013-05-13T13:16:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=53061363c7aa1ab9085273d269c6f04ac2162336'/>
<id>53061363c7aa1ab9085273d269c6f04ac2162336</id>
<content type='text'>
Previously only repeated `/` delimiters were collapsed into a
single `/`.  Now, the sequence `/.` at the end of the template, i.e.
only followed by a sequence of word characters, is collapsed into a single
`.`. This makes it easier to support suffixes on resource URLs.
For example, given a resource template of `/some/path/:id.:format`, if
the `:id` is `""` but format `"json"` then the URL is now
`/some/path.json`, rather than `/some/path/.json`.

BREAKING CHANGE: A `/` followed by a `.`, in the last segment of the
URL template is now collapsed into a single `.` delimiter. For example:
`users/.json` will become `users.json`. If your server relied upon this
sequence then it will no longer work. In this case you can now escape the
`/.` sequence with `/\.`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously only repeated `/` delimiters were collapsed into a
single `/`.  Now, the sequence `/.` at the end of the template, i.e.
only followed by a sequence of word characters, is collapsed into a single
`.`. This makes it easier to support suffixes on resource URLs.
For example, given a resource template of `/some/path/:id.:format`, if
the `:id` is `""` but format `"json"` then the URL is now
`/some/path.json`, rather than `/some/path/.json`.

BREAKING CHANGE: A `/` followed by a `.`, in the last segment of the
URL template is now collapsed into a single `.` delimiter. For example:
`users/.json` will become `users.json`. If your server relied upon this
sequence then it will no longer work. In this case you can now escape the
`/.` sequence with `/\.`
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(http): support request/response promise chaining</title>
<updated>2013-03-27T20:13:59+00:00</updated>
<author>
<name>Sylvester Keil</name>
</author>
<published>2013-02-26T09:22:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=4ae46814ff4e7c0bbcdbbefc0a97277283a84065'/>
<id>4ae46814ff4e7c0bbcdbbefc0a97277283a84065</id>
<content type='text'>
myApp.factory('myAroundInterceptor', function($rootScope, $timeout) {
    return function(configPromise, responsePromise) {
        return {
            request: configPromise.then(function(config) {
                return config
            });
            response: responsePromise.then(function(response) {
                return 'ha!';
            }
        });
}

myApp.config(function($httpProvider){
    $httpProvider.aroundInterceptors.push('myAroundInterceptor');
});
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
myApp.factory('myAroundInterceptor', function($rootScope, $timeout) {
    return function(configPromise, responsePromise) {
        return {
            request: configPromise.then(function(config) {
                return config
            });
            response: responsePromise.then(function(response) {
                return 'ha!';
            }
        });
}

myApp.config(function($httpProvider){
    $httpProvider.aroundInterceptors.push('myAroundInterceptor');
});
</pre>
</div>
</content>
</entry>
<entry>
<title>feat($resource): ability to override url in resource actions</title>
<updated>2013-02-27T18:52:30+00:00</updated>
<author>
<name>zeflasher</name>
</author>
<published>2013-02-22T02:49:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=60f1f099fc7e5197808cd6acb7407cdc40f50a3f'/>
<id>60f1f099fc7e5197808cd6acb7407cdc40f50a3f</id>
<content type='text'>
Resources now can defined per action url override. The url is treated
as a template rather than a literal string, so fancy interpolations
are possible.

See attached tests for example usage.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resources now can defined per action url override. The url is treated
as a template rather than a literal string, so fancy interpolations
are possible.

See attached tests for example usage.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix($http): don't encode URL query substring "null" to "+"</title>
<updated>2013-02-27T01:25:15+00:00</updated>
<author>
<name>Andrew McLeod</name>
</author>
<published>2013-02-26T05:25:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=86d191ed4aea9015adc71b852223475c5c762c34'/>
<id>86d191ed4aea9015adc71b852223475c5c762c34</id>
<content type='text'>
Fixes issue in encodeUriQuery used by $http and $resource that
treats null as a string and replaces the characters "null" with "+".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes issue in encodeUriQuery used by $http and $resource that
treats null as a string and replaces the characters "null" with "+".
</pre>
</div>
</content>
</entry>
<entry>
<title>fix($http): do not encode special characters `@$:,` in params</title>
<updated>2013-02-14T22:52:46+00:00</updated>
<author>
<name>Vojta Jina</name>
</author>
<published>2013-02-14T22:39:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=288b69a314e9bd14458b6647532eb62aad5c5cdf'/>
<id>288b69a314e9bd14458b6647532eb62aad5c5cdf</id>
<content type='text'>
encodeURIComponent is too aggressive and doesn't follow http://www.ietf.org/rfc/rfc3986.txt
with regards to the character set (pchar) allowed in path segments so we need
this test to make sure that we don't over-encode the params and break stuff
like buzz api which uses @self.

This is has already been fixed in `$resource`. This commit fixes it in a same way
for `$http` as well.

BREAKING CHANGE: $http does follow RFC3986 and does not encode special characters
like `$@,:` in params. If your application needs to encode these characters, encode
them manually, before sending the request.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
encodeURIComponent is too aggressive and doesn't follow http://www.ietf.org/rfc/rfc3986.txt
with regards to the character set (pchar) allowed in path segments so we need
this test to make sure that we don't over-encode the params and break stuff
like buzz api which uses @self.

This is has already been fixed in `$resource`. This commit fixes it in a same way
for `$http` as well.

BREAKING CHANGE: $http does follow RFC3986 and does not encode special characters
like `$@,:` in params. If your application needs to encode these characters, encode
them manually, before sending the request.
</pre>
</div>
</content>
</entry>
</feed>
