Skip to content
This repository has been archived by the owner on Jun 26, 2022. It is now read-only.

Commit

Permalink
Release 0.6.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Dec 14, 2013
1 parent ef396f4 commit a177a9f
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Exoskeleton 0.6.2 (14 December 2013)
* Added support for `data` option in `utils.ajax`.

# Exoskeleton 0.6.1 (9 December 2013)
* Fixed handling of missing common.js jQuery dependency.

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "exoskeleton",
"main": "exoskeleton.js",
"version": "0.6.1",
"version": "0.6.2",
"homepage": "https://github.com/paulmillr/exoskeleton",
"author": "Paul Miller (http://paulmillr.com)",
"description": "Faster and leaner Backbone for your HTML5 apps.",
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "exoskeleton",
"repo": "paulmillr/exoskeleton",
"description": "Faster and leaner Backbone for your HTML5 apps.",
"version": "0.6.1",
"version": "0.6.2",
"keywords": [
"Backbone",
"Exoskeleton",
Expand Down
21 changes: 20 additions & 1 deletion exoskeleton.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Exoskeleton.js 0.6.1
* Exoskeleton.js 0.6.2
* (c) 2013 Paul Miller <http://paulmillr.com>
* Based on Backbone.js
* (c) 2010-2013 Jeremy Ashkenas, DocumentCloud
Expand Down Expand Up @@ -419,6 +419,25 @@ utils.ajax = (function() {
if (options.headers == null) options.headers = {};
options.headers['Content-Type'] = options.contentType;
}

// Stringify GET query params.
if (options.type === 'GET' && typeof options.data === 'object') {
var query = '';
var stringifyKeyValuePair = function(key, value) {
return value == null ? '' :
'&' + encodeURIComponent(key) +
'=' + encodeURIComponent(value);
};
for (var key in options.data) {
query += stringifyKeyValuePair(key, options.data[key]);
}

if (query) {
var sep = (options.url.indexOf('?') === -1) ? '?' : '&';
options.url += sep + query.substring(1);
}
}

if (options.credentials) options.withCredentials = true;
xhr.addEventListener('readystatechange', end(xhr, options, deferred));
xhr.open(options.type, options.url, true);
Expand Down
2 changes: 1 addition & 1 deletion lib/header.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Exoskeleton.js 0.6.1
* Exoskeleton.js 0.6.2
* (c) 2013 Paul Miller <http://paulmillr.com>
* Based on Backbone.js
* (c) 2010-2013 Jeremy Ashkenas, DocumentCloud
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "exoskeleton",
"version": "0.6.1",
"version": "0.6.2",
"description": "Faster and leaner Backbone for your HTML5 apps.",
"main": "exoskeleton.js",
"directories": {
Expand Down

0 comments on commit a177a9f

Please sign in to comment.