Permalink
Browse files

Switched to RFC1738 query stringifier for application/x-www-form-urle…

…ncoded data
  • Loading branch information...
1 parent d5b13ad commit 4e3ea5709820be1f713b4d19ce2bb6c611ff6eaa Daniel Stevens committed Aug 3, 2012
Showing with 5 additions and 4 deletions.
  1. +3 −2 package.json
  2. +2 −2 src/client.coffee
View
@@ -1,7 +1,7 @@
{
"name": "3scale",
"description": "Client for 3Scale Networks API",
- "version": "0.3.1",
+ "version": "0.3.2",
"homepage": "http://www.3scale.net",
"repository": {
"type": "git",
@@ -31,7 +31,8 @@
"lib": "./lib"
},
"dependencies": {
- "libxmljs": "*"
+ "libxmljs": "*",
+ "qs": "*"
},
"devDependencies": {
"coffee-script": "1.x",
View
@@ -1,5 +1,5 @@
https = require 'https'
-querystring = require 'querystring'
+querystring = require 'qs'
libxml = require 'libxmljs'
Response = require './response'
@@ -109,7 +109,7 @@ module.exports = class Client
throw "no transactions to report"
url = "/transactions.xml"
- query = querystring.stringify {transactions: trans, provider_key: @provider_key}
+ query = querystring.stringify({transactions: trans, provider_key: @provider_key}).replace(/\[/g, "%5B").replace(/\]/g, "%5D")
req_opts =
host: @host

0 comments on commit 4e3ea57

Please sign in to comment.