Very nice and useful! We're currently using the servlet in a variety of instances. In one particular instance, when proxying to a project called SqlPad http://rickbergfalk.github.io/sqlpad/, signing in produces an error on the console:
"You must supply a verb to the fetch wrapper"
In firebug, the entire text of the console reads:
"NetworkError: 500 - http://localhost:8010/api/signin"
signin
[object Response]
[24]</module.exports/<()browserified.js (line 71)
e = Response { type="basic", url="http://localhost:8010/api/signin", status=500, more...}
...n/json"}};if(!e)throw new Error("You must supply a verb to the fetch wrapper");r...
browserified.js line 71 reads:
{"./App.js":1,"./ConfigValues.js":2,"./ConnectionAdmin.js":3,"./FilterableQueryList.js":4,"./ForgotPassword.js":5,"./FullscreenMessage.js":6,"./PasswordReset.js":7,"./QueryChartOnly.js":8,"./QueryEditor.js":9,"./QueryTableOnly.js":10,"./SignIn.js":11,"./SignUp.js":12,"./UserAdmin.js":13,"./utilities/fetch-json.js":24,"page":140,"react":484,"react-dom":303}],24:[function(require,module,exports){
"use strict";require("whatwg-fetch"),module.exports=function(e,r,t){var o={method:"GET",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"}};if(!e)throw new Error("You must supply a verb to the fetch wrapper");return o.method=e.toUpperCase(),t&&(o.body=JSON.stringify(t)),fetch(r,o).then(function(e){return 200===e.status?e.json():(console.error(e),{error:"Server responded not ok"})})};
Would be more than happy to roll up my sleeves if I could get a pointer!
Very nice and useful! We're currently using the servlet in a variety of instances. In one particular instance, when proxying to a project called SqlPad http://rickbergfalk.github.io/sqlpad/, signing in produces an error on the console:
"You must supply a verb to the fetch wrapper"
In firebug, the entire text of the console reads: "NetworkError: 500 - http://localhost:8010/api/signin" signin [object Response] [24]</module.exports/<()browserified.js (line 71) e = Response { type="basic", url="http://localhost:8010/api/signin", status=500, more...} ...n/json"}};if(!e)throw new Error("You must supply a verb to the fetch wrapper");r...
browserified.js line 71 reads:
{"./App.js":1,"./ConfigValues.js":2,"./ConnectionAdmin.js":3,"./FilterableQueryList.js":4,"./ForgotPassword.js":5,"./FullscreenMessage.js":6,"./PasswordReset.js":7,"./QueryChartOnly.js":8,"./QueryEditor.js":9,"./QueryTableOnly.js":10,"./SignIn.js":11,"./SignUp.js":12,"./UserAdmin.js":13,"./utilities/fetch-json.js":24,"page":140,"react":484,"react-dom":303}],24:[function(require,module,exports){ "use strict";require("whatwg-fetch"),module.exports=function(e,r,t){var o={method:"GET",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"}};if(!e)throw new Error("You must supply a verb to the fetch wrapper");return o.method=e.toUpperCase(),t&&(o.body=JSON.stringify(t)),fetch(r,o).then(function(e){return 200===e.status?e.json():(console.error(e),{error:"Server responded not ok"})})};
Would be more than happy to roll up my sleeves if I could get a pointer!