Get Data for DataTable from an external URL

I did not find a tutorial how to fill a datasource by a function that gets the data from an external URL by “4D.HTTPRequest”. Eg. an Entity or an EntitySelection and bind it to WebForm components.

Is there an example how it works, “best practice”?

Hey Renlite

here’s an example we use to get picture from using 4D.HTTPRequest",work").wait()
If (request.response != Null)
	BLOBTOPICTURE(request.response.body; image)

you can use like this code to fill an entity using an api

var info :object
var newUser: cs.UserEntity
var request : 4D.HTTPRequest"yourAPI").wait()
If (request.response != Null)

you will find more details about HTTPRequestClass param & return here : HTTPRequest | Qodly Developer Center

1 Like