From 56a6a7d5502766e08c908c9849a97e06b0e7fec0 Mon Sep 17 00:00:00 2001 From: syedmouaazfarrukh Date: Mon, 30 Jan 2023 08:12:50 -0800 Subject: [PATCH] Adding content to 108-working-with-apis --- .../flutter/content/108-working-with-apis/100-json.md | 9 +++++++-- .../content/108-working-with-apis/101-web-sockets.md | 2 +- .../content/108-working-with-apis/102-graphql.md | 2 +- .../flutter/content/108-working-with-apis/index.md | 11 ++++++++++- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/roadmaps/flutter/content/108-working-with-apis/100-json.md b/src/roadmaps/flutter/content/108-working-with-apis/100-json.md index 6b6c7a602..a9a037ce4 100644 --- a/src/roadmaps/flutter/content/108-working-with-apis/100-json.md +++ b/src/roadmaps/flutter/content/108-working-with-apis/100-json.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) \ No newline at end of file diff --git a/src/roadmaps/flutter/content/108-working-with-apis/101-web-sockets.md b/src/roadmaps/flutter/content/108-working-with-apis/101-web-sockets.md index 17a939f49..1b3a2484b 100644 --- a/src/roadmaps/flutter/content/108-working-with-apis/101-web-sockets.md +++ b/src/roadmaps/flutter/content/108-working-with-apis/101-web-sockets.md @@ -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) \ No newline at end of file diff --git a/src/roadmaps/flutter/content/108-working-with-apis/102-graphql.md b/src/roadmaps/flutter/content/108-working-with-apis/102-graphql.md index 3b8a9977f..daa7c3a64 100644 --- a/src/roadmaps/flutter/content/108-working-with-apis/102-graphql.md +++ b/src/roadmaps/flutter/content/108-working-with-apis/102-graphql.md @@ -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. diff --git a/src/roadmaps/flutter/content/108-working-with-apis/index.md b/src/roadmaps/flutter/content/108-working-with-apis/index.md index d17a947bb..059b7a2cc 100644 --- a/src/roadmaps/flutter/content/108-working-with-apis/index.md +++ b/src/roadmaps/flutter/content/108-working-with-apis/index.md @@ -1 +1,10 @@ -# Working with apis \ No newline at end of file +# 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) \ No newline at end of file