http() function isn't working
Or it isn't working the way it used to. Can anyone confirm this?
47 replies
-
Bumpity bump bump
-
Sean on what format mac - ipad or web vcloud version
and i will take a look (i'm cloud version)
-
Mel, I'm using the Mac version. I can't access websites or APIs with the function anymore
-
I just sent a second email to support. Does no one use this function?
-
What error message do you get? "Server not responding"?
-
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; -
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.
-
That thread link just gets me to a 504 Gateway Time-Out error page...
-
That's hilarious. Links were working. It's on page 4 of "Use cases". The database should still be in the English webinar
-
Btw, that database does not have the scraping code in it.
-
FWIW, the ipify API works, but Google translate does not
-
The code I posted is a variation from this thread and it's almost 2 years old...
-
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
-
Are you using the cloud version? I'm using the Mac app and I still get the same error.
-
Oh right. I'm on the Cloud version.
Good luck, hope support helps!
-
Thanks Kaan, I think we'll get there eventually
-
It's been a week. Time to bump this puppy.
-
Still not fixed.
-
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. :)
-
@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?
-
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.
-
Steven, did it work before one of the updates?
-
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.....
-
To be complete, on my Macbook with the native app, it also won't work.
-
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
- 3991Views