Web API issues on Web-App

Hi thunk gurus,

I came across this issue using the WEB API to access websites for the purpose of parsing specific information within the HTML. On the live test with the mobile phone, it worked well. But while I was to create a web-app, and tested it. I always give this in the error block, with no response:

" The website or service provider you are trying to reach does not support HTTPS requests."

Tried with many websites URL and it still gave the same results using web-app. Only those URLs that return JSON format works and all those with HTML returns the above message. On the phone, everything worked well.

Is there any other way to allow the web-API responses to read HTML on the web-app implementation?

Hey @gobassky :wave:

Did you manage to make any progress with this?

If you share a MWE with us we can take a closer look at it for you.

Thanks!

No Joy. I simply work around the problem by using mobile app to download HTML (source text), store it on airtable and then the Webapp will take the data from airtable. Very cumbersome.

https://x.thunkable.com/copy/9ada345764b63ad5d26e81c00f6888e8

Here is one example of what I have tried to do. Web API response with error on Live test and webapp. But ok on companion app. Btw, I needed the source HTML to parse some open source information, such as the news links url contained with the HTML texts…

Btw, I wanted the source HTML is to parse some open source information, such as the news links.

To solve this problem, I would use Javascript and then forward the result to the App. You can also use blocks to solve this problem, but it will be very cumbersome and confusing blocks, in which you will forget how and what works in them in a month.

1 Like

@actech Thanks. You mean use JS as separate program and forward the results as texts to the app for parsing data? hmm sounds like a viable workaround. But best is still able to use blocks to directly get the HTML source from Web API blocks… I have no issues parsing the contents as long as I can get the source and not having the error message:
" The website or service provider you are trying to reach does not support HTTPS requests."

In this case, I’m saying that there are things that are more practical to do with JavaScript, which can be considered as an extension for Thuinkable X. You can also hammer nails with a shovel, but it is more convenient to do this with a hammer. In this case, the hammer is Javascript.

The problem with block programming platforms is that they are extremely inconvenient to work with text code. Some may say that they are not intended for this purpose. But practice shows that text programming can be easily used together with blocks and it is not as difficult as someone says it is.

Thanks. I also see it as you seen it. Best is to use one platform to do everything. But I haven’t known a way to insert text code with blocks. I read somewhere about using HTMLs with web viewer blocks, but haven’t been able to do it myself. So for your suggestion, you mean to use javascript program to do the parsing and host it somewhere, and then let webAPI to retrieve the resultant info? Ok, I try to explore this route.

Basic example for working with a Web extension in Thunkable X. For simplicity, I did everything using the Data URI, but this method will not work for apps installed on iOS. Therefore, in a real application, you will need to add a script file to the project to work with the Web extension.

https://x.thunkable.com/projects/5f51e8b9f21990f52a4929fc/project/properties/designer/

1 Like

Thank you very much. Looking into it now, potentially very useful.

hey guys, i faced the same issue just today. I thing this is a bug because i removed my WEB API component, then i inserted a new one with a new name and that´s all, after that i don´t have the error “The website or service provider you are trying to reach does not support HTTPS requests”. it works ok even with a web-app (with mobile app always worked fine).

1 Like

13 posts were split to a new topic: Connecting to an API