The u-http module offers a Request class that lets you setup HTTP requests easy in your app.
In this example, we create an action that you can attach to the "On Press" event of a button. You also need to supply the action with a Text component.
When the action is triggered, it sends a HTTP request to fetch a list of Bitcoin trade data. The response is handled in the success callback, by displaying the data in the Text component. Errors are handled in the error callback handler.
The
u-http
module offers aRequest
class that lets you setup HTTP requests easy in your app.In this example, we create an action that you can attach to the "On Press" event of a button. You also need to supply the action with a Text component.
When the action is triggered, it sends a HTTP request to fetch a list of Bitcoin trade data. The response is handled in the success callback, by displaying the data in the Text component. Errors are handled in the error callback handler.