English 中文(简体)
Jquery ajax打电话到Hello Wiki Rest Service in opa
原标题:Jquery ajax call to Hello Wiki Rest service in opa
  • 时间:2011-10-18 10:01:37
  •  标签:
  • opa

我们是否可以像<条码>http:// localhost:8080/_rest_/hello那样发出警示?

If I make this ajax call I m getting response is null instead of content of page. But If I run in browser or execute command

curl http://localhost:8080/_rest_/hello

该公司正在做罚款。 我感谢。

问题回答

在经过一些调查之后,这是我发现的:

$.ajax({ url: "http://localhost:8080/_rest_/hello", type: "POST", datatype: "html", success: function(resp) { alert(resp); } });

工作(注意到警示而不是html电话)。 因此,服务器给予你答复(正如你所说,曲线成功)。

服务器反应的内容是什么?

我认为,你应当归还对<rest<>>>/em>/hello的答复。 j Query html似乎只有有效的超文本。

否则,您可以:

$( #response ).load( http://localhost:8080/_rest/hello );




相关问题
Can different OPA apps share Databases?

I m just investigating OPA and trying to make the leap from a traditional LAMP background, so here s my first of many newbie questions: Can I have two OPA apps sharing the same database, say one ...

Equivalent of List.exists for Db

I ve used List.exists( ), i woudl like to know if there is an equivalent for Db. If i have a function f(e) : bool, i would like to know if there is at least one element e, with f(e) -> true. ...

Looping over db intmap(person)

example: type person = { name : string ; age : int } db /person : intmap(person) I know how to get a single person from the db, but how do I get them all? and print ...

Can opa extensions be written in Ocaml?

I notice that included in the source of the OpaWhiteBoard example, there is a .ml file here: https://github.com/hhugo/OpaWhiteBoard/blob/master/src/opacairo/cairo.ml This appears to be OCaml with ...

Access a record field

This code source don t compile, Is there a way to make that in OPA ? type User = { nom : string ; prenom : string } un_user = { nom = "My_name" ; prenom = "My_last_name" } : User champ = "nom" do ...

OPA syntax question

I have seen in the stdlib and in some github project. Code like that : MyClass = field_id(id) = "{id}_field" {{ my_func(args) = output }} What the interest to have function before the {{ }} ...

热门标签