Permalink
Browse files

trivial support for post

  • Loading branch information...
1 parent 011f599 commit dd0336410e9d3a4ae011e2ccfebd0c9c65f7522d @smparkes committed Jun 23, 2009
Showing with 2 additions and 2 deletions.
  1. +1 −1 dist/env.rhino.js
  2. +1 −1 src/platform/rhino.js
View
2 dist/env.rhino.js
@@ -288,7 +288,7 @@ var Envjs = function(){
//write data to output stream if required
if(data&&data.length&&data.length>0){
- if ( xhr.method == "PUT" ) {
+ if ( xhr.method == "PUT" || xhr.method == "POST" ) {
connection.setDoOutput(true);
var outstream = connection.getOutputStream(),
outbuffer = new java.lang.String(data).getBytes('UTF-8');
View
2 src/platform/rhino.js
@@ -127,7 +127,7 @@
//write data to output stream if required
if(data&&data.length&&data.length>0){
- if ( xhr.method == "PUT" ) {
+ if ( xhr.method == "PUT" || xhr.method == "POST" ) {
connection.setDoOutput(true);
var outstream = connection.getOutputStream(),
outbuffer = new java.lang.String(data).getBytes('UTF-8');

0 comments on commit dd03364

Please sign in to comment.