mirror of https://github.com/axmolengine/axmol.git
Fixed check for arguments at xhr.send()
This commit is contained in:
parent
89fc8168e5
commit
4cb3001fc6
|
@ -616,19 +616,19 @@ JS_BINDED_FUNC_IMPL(MinXmlHttpRequest, send)
|
||||||
{
|
{
|
||||||
|
|
||||||
JSString *str;
|
JSString *str;
|
||||||
|
char *data;
|
||||||
|
|
||||||
// Clean up header map. New request, new headers!
|
// Clean up header map. New request, new headers!
|
||||||
http_header.clear();
|
http_header.clear();
|
||||||
|
if (argc == 2) {
|
||||||
if (!JS_ConvertArguments(cx, argc, JS_ARGV(cx, vp), "S", &str)) {
|
if (!JS_ConvertArguments(cx, argc, JS_ARGV(cx, vp), "S", &str)) {
|
||||||
return JS_FALSE;
|
return JS_FALSE;
|
||||||
};
|
};
|
||||||
|
data = JS_EncodeString(cx, str);
|
||||||
if (meth.compare("post") == 0 || meth.compare("POST") == 0) {
|
}
|
||||||
|
|
||||||
char *data = JS_EncodeString(cx, str);
|
|
||||||
cc_request->setRequestData(data, strlen(data));
|
|
||||||
|
|
||||||
|
if (meth.compare("post") == 0 || meth.compare("POST") == 0) {
|
||||||
|
cc_request->setRequestData(data, strlen(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
_setHttpRequestHeader();
|
_setHttpRequestHeader();
|
||||||
|
|
Loading…
Reference in New Issue