コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

CQ.HTTP.post()

Avatar

Level 5

Hi masters!

Do you have any reference, example, tutorial... about using CQ.HTTP.post() to get server data from the browser? I would like to use it to call to /bin/querybuilder. I've done it using JQuery ajax() method, but I suspect that CQ.HTTP.post() will be more 'elegant' solution...

I've checked the official documentation [1], but there's no example...

Thank you very much!

Regards,

Julio.

[1] http://dev.day.com/docs/en/cq/current/widgets-api/?class=CQ.HTTP

1 受け入れられたソリューション

Avatar

正解者
Level 10

CQ.HTTP.post is just another way to do the same thing as AJAX. You can post data using AJAX and i would not say that it's less elegant. AJAX is a standard web technology.  

We have examples of using AJAX to post data from a CQ page to a CQ sling servlet.

You can also post data to CQ using Sling Post Servlets.  

However - having said that -- CQ.HTTP.post is part of CQ and there should be an example of how to use it. I will work with the doc team to make this happen. 

元の投稿で解決策を見る

4 返信

Avatar

正解者
Level 10

CQ.HTTP.post is just another way to do the same thing as AJAX. You can post data using AJAX and i would not say that it's less elegant. AJAX is a standard web technology.  

We have examples of using AJAX to post data from a CQ page to a CQ sling servlet.

You can also post data to CQ using Sling Post Servlets.  

However - having said that -- CQ.HTTP.post is part of CQ and there should be an example of how to use it. I will work with the doc team to make this happen. 

Avatar

Level 5

Thank you smacdonald2008!

I agree on almost everything you say, but I would like to compare myself both of them. And it's a good opportunity to learn one more thing! smiley

I'll be waiting, and searching, for any update on this documentation.

Best regards!

Avatar

Level 10

We added this to our list to base a CQ dev community article on. Once done - I will update this thread with the link to the community article. 

Avatar

Level 5

Thank you very much! I'll be waiting for news!

Best regards,

J.