Calling a API using http in flutter.





Calling a API using http in flutter.


To begin with I will create a JSON file in a github gist.
To create a gist go to your github account, open this menu and select new gist

Write the code and press Create secret gist.

The gist is created now.


Press the Raw link to open it in a separate tab.



Copy the URL https://gist.githubusercontent.com/champaksworldcreate/d6fdfae746def4f796d585be3f5bfbde/raw/2d7c6c9efeda1c153dbe571a8049d86312a7cc60/testdata.json


Now, divide this URL into 2 parts, the site url and the path.
siteurl=gist.githubusercontent.com
suburl=/champaksworldcreate/d6fdfae746def4f796d585be3f5bfbde/raw/2d7c6c9efeda1c153dbe571a8049d86312a7cc60/testdata.json


Contact us for software training, education or development










 

Post a Comment

0 Comments