Config Http Request with Flutter and Make Request (Get, Post, Put, Delete)

Zain Ahmed
2 min readApr 28, 2020

--

in sure it will help you in development with Flutter..!

To do request from flutter app you have a package/library called http Dart you can install it by command

with pub:

$ pub get

with Flutter:

$ flutter pub get

Or by just add this line in you root pubspec.yaml

dependencies: http: ^0.12.1

now after this you will just have to import this library in file

import ‘dart:convert’ as convert;

import ‘package:http/http.dart’ as http;

  1. convert is for decode response in json format.

2. and http is for requests

for development you have to make request https and for that you can use ngrok to make request http on localserver

Get Method:

Post Method:

Put Method

Delete Method

I hope it give you some information..!

you Tube channel : https://www.youtube.com/channel/UCkaoWtBz6ioLbNwRzIco5Yg

--

--

Zain Ahmed
Zain Ahmed

Written by Zain Ahmed

Hello everyone, I am Zain Anmed a software engineer by profession, passionate about trying different technologies and trying some other cool stuff.

No responses yet