Sandman Expert Licensed User Longtime User Jun 3, 2020 #1 This is a low priority wish that also could be implemented by a forum member looking for a fun challenge. Now and then we get questions on how to convert a curl request to B4X. (Example thread) Recently I found an official tool by the curl team: h2c. It helps convert a set of headers to a curl request (headers to curl --> h2c). It can be found here: https://curl.haxx.se/h2c/ The obvious idea, and wish, is for somebody to make a c2b4x tool to help convert a curl request and get b4x code back. In many ways this is identical to the nice (but somewhat strangely named ) JSON Tree Example tool that has helped a lot of members.
This is a low priority wish that also could be implemented by a forum member looking for a fun challenge. Now and then we get questions on how to convert a curl request to B4X. (Example thread) Recently I found an official tool by the curl team: h2c. It helps convert a set of headers to a curl request (headers to curl --> h2c). It can be found here: https://curl.haxx.se/h2c/ The obvious idea, and wish, is for somebody to make a c2b4x tool to help convert a curl request and get b4x code back. In many ways this is identical to the nice (but somewhat strangely named ) JSON Tree Example tool that has helped a lot of members.
Alexander Stolte Expert Licensed User Longtime User Jun 3, 2020 #2 Sandman said: JSON Tree Example Click to expand... This tool is epic, I've needed this so many times before...
Sandman said: JSON Tree Example Click to expand... This tool is epic, I've needed this so many times before...
aeric Expert Licensed User Longtime User Jun 4, 2020 #3 I think curl returns different types of response such as html, xml and json format or maybe object like image. So I am not sure how a tool can be build for it. You mean build something like Postman?
I think curl returns different types of response such as html, xml and json format or maybe object like image. So I am not sure how a tool can be build for it. You mean build something like Postman?
OliverA Expert Licensed User Longtime User Jun 4, 2020 #4 aeric said: I think curl returns different types of response Click to expand... This wish (unless I misunderstood) is not for handling the response, but to build the request. So take a CURL request and transform it to an equivalent HttpJob request (be it GET/POST/etc)
aeric said: I think curl returns different types of response Click to expand... This wish (unless I misunderstood) is not for handling the response, but to build the request. So take a CURL request and transform it to an equivalent HttpJob request (be it GET/POST/etc)
Sandman Expert Licensed User Longtime User Jun 4, 2020 #5 OliverA said: This wish (unless I misunderstood) is not for handling the response, but to build the request. Click to expand... You did not misunderstand, that is correct.
OliverA said: This wish (unless I misunderstood) is not for handling the response, but to build the request. Click to expand... You did not misunderstand, that is correct.
Erel B4X founder Staff member Licensed User Longtime User Jun 4, 2020 #6 I think that it will be easier and still very helpful to create a tutorial that shows the common curl options and how they convert to HttpJob.
I think that it will be easier and still very helpful to create a tutorial that shows the common curl options and how they convert to HttpJob.
aeric Expert Licensed User Longtime User Jun 4, 2020 #7 OliverA said: This wish (unless I misunderstood) is not for handling the response, but to build the request. So take a CURL request and transform it to an equivalent HttpJob request (be it GET/POST/etc) Click to expand... I see. Maybe I confused with JSON Tree Example. ?
OliverA said: This wish (unless I misunderstood) is not for handling the response, but to build the request. So take a CURL request and transform it to an equivalent HttpJob request (be it GET/POST/etc) Click to expand... I see. Maybe I confused with JSON Tree Example. ?