Adding content to 108-working-with-apis

pull/3389/head
syedmouaazfarrukh 2 years ago
parent 5171207ea3
commit 56a6a7d550
  1. 9
      src/roadmaps/flutter/content/108-working-with-apis/100-json.md
  2. 2
      src/roadmaps/flutter/content/108-working-with-apis/101-web-sockets.md
  3. 2
      src/roadmaps/flutter/content/108-working-with-apis/102-graphql.md
  4. 11
      src/roadmaps/flutter/content/108-working-with-apis/index.md

@ -1,7 +1,12 @@
# Json
# JSON
JSON (JavaScript Object Notation) is a simple data interchange format used to communicate with server, store and retrieve data from it.
JSON (JavaScript Object Notation) is a lightweight data interchange format that is easy for humans to read and write and easy for machines to parse and generate. In Flutter, JSON is used for transmitting data between the client and server, typically over an HTTP connection.
Flutter provides a number of libraries for working with JSON data, including the `dart:convert` library, which provides support for encoding and decoding JSON data.
To encode a Dart object to a JSON string, you can use the `jsonEncode` function from the `dart:convert` library. To decode a JSON string to a Dart object, you can use the jsonDecode function.
Visit the following resources to learn more:
- [JSON and serialization](https://docs.flutter.dev/development/data-and-backend/json)
- [Using JSON](https://dart.dev/guides/json)

@ -2,7 +2,7 @@
In addition to normal HTTP requests, you can connect to servers using WebSockets. Web sockets allows for bidirectional communication between a client (such as a web browser) and a server over a single, long-lived connection. They are a more efficient alternative to HTTP for providing real-time data, as they allow for the server to push data to the client as soon as it becomes available, rather than requiring the client to continuously poll the server for updates.
Visit the following resources to learn more:
- [Work with WebSockets](https://docs.flutter.dev/cookbook/networking/web-sockets)
- [What is WebSocket and How It Works?](https://www.wallarm.com/what/a-simple-explanation-of-what-a-websocket-is)

@ -1,4 +1,4 @@
# Graphql
# GraphQL
GraphQL is a query language for your API that allows clients to request exactly the data they need, and nothing more. It was developed by Facebook and released as open source in 2015.

@ -1 +1,10 @@
# Working with apis
# Working with APIs
Working with APIs in Flutter involves making HTTP requests to a server and processing the responses. Flutter provides a number of libraries for making HTTP requests, including `dart:io` and `http`.
The `http` library is a popular choice for making HTTP requests in Flutter, as it is easy to use and provides support for HTTP methods such as GET, POST, PUT, DELETE, and more.
Learn more from the following resources:
- [Using Google APIs](https://dart.dev/guides/google-apis)
- [How to work with APIs in Flutter?](https://www.youtube.com/watch?v=uVo7HDWDUEQ)
Loading…
Cancel
Save