0

http() function isn't working

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

47 replies

null
    • Sean
    • 3 yrs ago
    • Reported - view

    Bumpity bump bump

    • Mel_Charles
    • 3 yrs ago
    • Reported - view

    Sean on what format mac - ipad or web vcloud version

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

    • Sean
    • 3 yrs ago
    • Reported - view

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

    • Sean
    • 3 yrs ago
    • Reported - view

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

    • Kaan_Dikmen
    • 3 yrs ago
    • Reported - view

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

    • Kaan_Dikmen
    • 3 yrs ago
    • Reported - view

    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;

    • Sean
    • 3 yrs 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.

    • Kaan_Dikmen
    • 3 yrs ago
    • Reported - view

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

    • Sean
    • 3 yrs 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 

    • Sean
    • 3 yrs ago
    • Reported - view

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

    • Sean
    • 3 yrs ago
    • Reported - view

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

    • Sean
    • 3 yrs ago
    • Reported - view
    • Kaan_Dikmen
    • 3 yrs ago
    • Reported - view

    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

    • Sean
    • 3 yrs ago
    • Reported - view

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

    • Kaan_Dikmen
    • 3 yrs ago
    • Reported - view

    Oh right. I'm on the Cloud version. 

    Good luck, hope support helps!

    • Sean
    • 3 yrs ago
    • Reported - view

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

    • Sean
    • 3 yrs ago
    • Reported - view

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

    • Sean
    • 3 yrs ago
    • Reported - view

    Still not fixed.

     

    Screen Shot 2021-03-12 at 2.50.35 PM

    • Kaan_Dikmen
    • 3 yrs ago
    • Reported - view

    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. :)

    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    @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?

    • Sean
    • 3 yrs 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.

    • Sean
    • 3 yrs ago
    • Reported - view

    Steven, did it work before one of the updates?

    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    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.....

    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

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

    • Sean
    • 3 yrs 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?

Content aside

  • 2 yrs agoLast active
  • 47Replies
  • 4015Views