0

http() function isn't working

Or it isn't working the way it used to. Can anyone confirm this?

47replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • Sean
    • Sean
    • 1 yr ago
    • Reported - view

    Bumpity bump bump

    Like
  • Sean on what format mac - ipad or web vcloud version

    and i will take a look (i'm cloud version)

    Like
    • Sean
    • Sean
    • 1 yr ago
    • Reported - view

    Mel, I'm using the Mac version. I can't access websites or APIs with the function anymore 

    Like
    • Sean
    • Sean
    • 1 yr ago
    • Reported - view

    I just sent a second email to support. Does no one use this function?

    Like
  • What error message do you get? "Server not responding"?

    Like
  • I have a function that grabs genders using the genderize.io free api. It works fine for me.

    """ // Assigns gender to all unassigned People """;
    function genderize() do
    let urlbase := "https://api.genderize.io?name=";
    let cands := (select People)[Gender != 1 and Gender != 2];
    for c in cands do
    let first := extractx(c.Name, "[a-zA-Z]*\b");
    let response := http("GET", urlbase + first);
    if response.error then
    first + ": " + text(response.error)
    else
    first + ": " + text(response.result);
    let g := response.result.gender;
    if g = "male" then c.(Gender := 1) else c.(Gender := 2) end
    end
    end
    end;

    Like
    • Sean
    • Sean
    • 1 yr ago
    • Reported - view

    Hi Kaan,

    Thanks for responding. The error I get is, "Request failed: error - ".

     

    I want to point out that I haven't changed my code and it had worked for months. You can check out this thread from September, https://ninox.com/en/forum/use-cases-5abd0b9c4da2d77b6ebfa395/ninox-forum-database-5f4f37848dfe7919e5b390c5. I assure you that I did not manually copy all those threads and posts. I wrote an HTML scraper and the code hasn't changed. I can't even get a web page to show up anymore. This code used to bring up a web page if you put it into a Formula field...

     

    let rt := html("");
    let response := http("GET", Text);
    if response.error then
    rt := html("<h1>Error</h1><p>" + text(response.error) + "</p>");
    else
    rt := html(response.result)
    end;
    rt

     

    "Text" is a text field with a URL in it.

    Like
  • That thread link just gets me to a 504 Gateway Time-Out error page...

    Like
    • Sean
    • Sean
    • 1 yr ago
    • Reported - view

    That's hilarious. Links were working. It's on page 4 of "Use cases". The database should still be in the English webinar 

    Like
    • Sean
    • Sean
    • 1 yr ago
    • Reported - view

    Btw, that database does not have the scraping code in it.

    Like
    • Sean
    • Sean
    • 1 yr ago
    • Reported - view

    FWIW, the ipify API works, but Google translate does not 

    Like
    • Sean
    • Sean
    • 1 yr ago
    • Reported - view
    Like
  • I got the same Error response using the code snippet you pasted... but wrapping the http() request in do as server <function> end did the trick for me.

     

    let rt := html("");
    let response := do as server 

    http("GET", Text)

    end;
    if response.error then
    rt := html("<h1>Error</h1><p>" + text(response.error) + "</p>");
    else
    rt := html(response.result)
    end;
    rt

    Like
    • Sean
    • Sean
    • 1 yr ago
    • Reported - view

    Are you using the cloud version? I'm using the Mac app and I still get the same error.

    Like
  • Oh right. I'm on the Cloud version. 

    Good luck, hope support helps!

    Like
    • Sean
    • Sean
    • 1 yr ago
    • Reported - view

    Thanks Kaan, I think we'll get there eventually 😏

    Like
    • Sean
    • Sean
    • 1 yr ago
    • Reported - view

    It's been a week. Time to bump this puppy.

    Like
    • Sean
    • Sean
    • 1 yr ago
    • Reported - view

    Still not fixed.

     

    Screen Shot 2021-03-12 at 2.50.35 PM

    Like
  • I think gold standard for responsiveness to the community has to be Coda right now; which is a shame because the Ninox product is so powerful. Wit's the right support, documentation (please, hire / contract with a professional technical writer!!) and partner ecosystem - and access and privilege management - Ninox could absolutely sweep the SME market... such an opportunity. 

     

    Common Ninox - we love you. Tell us what you're working on!!

     

    and get a better forum platform, one that filters out the voodoo spam. :)

    Like
  • @Sean,

    Have you looked in the console?

    I also have also blocked requests due to > CORS-header ‘Access-Control-Allow-Origin’ may not be *

    Any Solution?

    Like
    • Sean
    • Sean
    • 1 yr ago
    • Reported - view

    Steven,

    I never thought about using the console. I tried to open up a forum page using the function in the console and got this... {"error":"Request failed: error - "}. I did try language detection using Google Translate and it worked.

     

    Your error is Cross-Origin Resource Sharing. You can get some info on that here https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSMissingAllowOrigin . I'll check into this more tonight.

    Like
    • Sean
    • Sean
    • 1 yr ago
    • Reported - view

    Steven, did it work before one of the updates?

    Like
  • Sean, Can't tell as this is a new created API call I try (carbone.io) I've installed a plugin(CORS Everywhere) in Firefox and now I don't have connect errors.

    But I'm still struggeling to get the wanted result with this carbone thing.... To be continued.....

    Like
  • To be complete, on my Macbook with the native app, it also won't work.

    Like
    • Sean
    • Sean
    • 1 yr ago
    • Reported - view

    Steven, I just got a look at carbone.io and it will take more than a casual look to understand how to use it in Ninox. How are you trying to integrate it - Button, Print, something else?

    Like
Like Follow
  • 7 mths agoLast active
  • 47Replies
  • 3588Views