首页 \ 问答 \ 调用Ext.Ajax.request时收到错误请求(Getting bad request when calling Ext.Ajax.request)

调用Ext.Ajax.request时收到错误请求(Getting bad request when calling Ext.Ajax.request)

我在运行此代码时遇到了错误的请求

Ext.Ajax.request({
           url: loginHostUri,
           method:'POST',
           headers:{
               'Accept':'application/x-www-form-urlencoded'
           },
           extraParams:{
               grant_type:'password',
               username:username,
               password:psswd,
               client_id: consumerKey,
               client_secret: consumerSecret
           },
           success: function(response){
               Ext.Msg.alert('Info',reponse);
           }
       });

当我使用javascript debuger时,我收到错误消息“XMLHttpRequest无法加载”“Access-Control-Allow-Origin不允许使用Origin null”。


Im getting a bad request when running this code

Ext.Ajax.request({
           url: loginHostUri,
           method:'POST',
           headers:{
               'Accept':'application/x-www-form-urlencoded'
           },
           extraParams:{
               grant_type:'password',
               username:username,
               password:psswd,
               client_id: consumerKey,
               client_secret: consumerSecret
           },
           success: function(response){
               Ext.Msg.alert('Info',reponse);
           }
       });

When i use the javascript debuger i get an error message "XMLHttpRequest cannot load " "Origin null is not allowed by Access-Control-Allow-Origin."


原文:https://stackoverflow.com/questions/13244780
更新时间:2022-12-03 15:12

最满意答案

SQLite3支持REGEXP运算符:

WHERE x REGEXP <regex>

SQLite3 supports the REGEXP operator:

WHERE x REGEXP <regex>

http://www.sqlite.org/lang_expr.html#regexp

相关问答

更多
  • 不幸的是, dplyr无法将许多有用的函数转换为它传递给sqlite的sql查询。 您可以在dplyr数据库插图中看到它可以使用的函数列表: dplyr知道如何将以下R函数转换为SQL: 基本数学运算符:+, - ,*,/,%%,^ 数学函数:abs,acos,acosh,asin,asinh,atan,atan2,atanh,ceiling,cos,cosh,cot,coth,exp,floor,log,log10,round,sign,sin,sinh,sqrt,tan,tanh 逻辑比较:<,<=,! ...
  • 一种实用的方法,假设所有字符串都具有相同的字段结构: $strings = "{u'specialGroup': u'projectWriters', u'role': u'WRITER'}", ", {u'role': u'WRITER', u'userByEmail': u'john@domain.com'" $strings | ForEach-Object { ($_ -split 'u''|''' -notmatch '[{}:,]')[1,3] } 收益率: proje ...
  • SQLite3支持REGEXP运算符: WHERE x REGEXP SQLite3 supports the REGEXP operator: WHERE x REGEXP http://www.sqlite.org/lang_expr.html#regexp
  • 如此处所述,您需要提供一些本机C / C ++代码,以便将正则表达式函数导出到SQL。 您可以通过调用函数sqlite3_create_function_v2来实现 ,该函数是用C编写的SQL库的一部分。 由于QSqlDatabase是一个通用的SQL包装器,旨在支持大量的SQL引擎,因此提供的函数是所有这些函数的最小公分母。 因此,您无法从Qt访问sqlite3_create_function_v2 。 如果需要在Qt应用程序中使用REGEXP,则需要在整个项目中使用普通的C sqlite库。 围绕SQL ...
  • sqlite不优化WHERE ... REGEXP ...来使用索引。 x REGEXP y只是一个函数调用; 它相当于regexp(x,y) 。 另请注意,并非所有sqlite安装都定义了regexp函数,因此使用它(或REGEXP运算符)不是非常便携。 另一方面, LIKE / GLOB可以利用前缀查询的索引,只要满足一些附加条件 : LIKE或GLOB的右侧必须是字符串文字或绑定到不以通配符开头的字符串文字的参数。 通过在左侧使用数字值(而不是字符串或blob),一定不能使LIKE或GLOB运算符成为 ...
  • 好像你想要这样的东西, String s = "String txt = \"Map. 12. txt Map. 13. txt Map. 14 txt "; Matcher m = Pattern.compile("(Map\\p{Punct}\\p{Space})([0-9]+\\p{Punct})(.+?)\\s*(?=Map|$)").matcher(s); while(m.find()) { System.out.println(m.group()); } 输出: Map. 12. txt M ...
  • SQLite默认情况下不实现REGEXP运算符。 (如果是的话,第二个操作数必须是一个字符串。) 您可以使用LIKE获得相同的效果: ... WHERE reqs LIKE '1,%' OR reqs LIKE '%,1,%' OR reqs LIKE '%,1' OR reqs = '1' SQLite does not implement the REGEXP operator by default. (And if it were, the second operand would have to ...
  • 不要在text字段类型上尝试正则表达式搜索,而是在string字段类型上尝试,因为您的正则表达式跨越多个单词。 (如果正则表达式需要匹配单个单词,则可以使用text字段。) 还要对特殊字符进行百分比编码 ,以确保它们不是导致不匹配的原因。 q=strfield:/description%3A(.*?)company(.*?)%3B.*/ 更新:刚刚在字符串字段上尝试过。 以上正则表达式有效。 即使没有编码百分比,它也可以工作 q=strfield:/description:.*?company.*?;.* ...
  • REGEXEXTRACT是一个内置函数,它接受两个参数,输入值位置和正则表达式。 然后,它按顺序将捕获的组(括号内的部分)放在下一个单元格中。 您无法更改该行为,因为您无法编辑内置函数的代码。 如果你想在structure3之前使用structure2那么D1 = B1是你最好的选择。 该正则表达式与google.com/page.php不匹配。 你期望的行为是什么? 如果您希望它始终匹配,请尝试使URL中的额外结构可选,如下所示: ".*(?:\/(\w+))?(?:\/(\w+)\/)?" (?:foo ...
  • 在sqllite中,默认情况下不包含“REGEXP”功能,您需要“自己滚动”。 但是,只要您的搜索相当简单,“LIKE”运算符就可以执行您想要的操作。 文档 In sqllite the "REGEXP" function is not included by default and you need to "roll your own". However the "LIKE" operator should do what you want as long as your searches are rea ...

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)