Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6848123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:49:46+00:00 2026-05-27T00:49:46+00:00

I have a Play! application and from the JavaScript we now have run in

  • 0

I have a Play! application and from the JavaScript we now have run in to the Same Origin Policy Problem.

What I want is that JavaScript ajax calls go to our own server and that this server again route the json call to the external REST API.

My JavaScript use ajax to this url:

$.getJSON("http://mydomain.com/users", function(users) {
    //callback          
});

How can I easly make the server route to lets say:

public void getUsers(){
     // result = call www.otherdomain.org/api/users.json   What to do here?
     renderJson(result);
}

and the return the response?

Or can it be done dynamically somewhere by directly rerouting?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:49:46+00:00Added an answer on May 27, 2026 at 12:49 am

    here comes an example for doing async http calls (e.g. to facebook api)

    WSRequest req = WS.url("https://graph.facebook.com/100001789213579");
    Promise<HttpResponse> respAsync = req.getAsync();
    HttpResponse resp = await(respAsync);
    
    JsonElement jsonResp = resp.getJson();
    JsonObject jsonObj = new JsonObject();
    jsonObj.add("facebook-response", jsonResp);
    
    renderJSON(jsonObj);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Play Framework application that sends emails using SMTP server. Now I
I currently have an application that calls creates and displays charts from various objects'
in my application i have the playvideo page where video will play, below that
I want to play YouTube videos from my iPhone app. I have to tried
I'm trying to launch an intent from my application that will play audio from
I'm working on a 1.2 Play! framework application, and I have a problem when
I have an application from where a play a radio stream using a service
I have play-framework application that uses one module which I've created by play new-module
At work we have an application to play 2K (2048*1556px) OpenEXR film sequences. It
I have a web application for video upload and play.The administrator can upload and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.