http_requests 3.0.0 copy "http_requests: ^3.0.0" to clipboard
http_requests: ^3.0.0 copied to clipboard

HTTP Requests Package Inspired By Python Requests Module Which Is Used For To Make Http Request And Get Response. You Can Use It In Rest Api

example/example.dart

import 'package:http_requests/http_requests.dart';

void main() async {
  // Get Method
  HttpResponse r = await HttpRequests.get("https://secanonm.in");
  print(r);

  // Post Method With Headers And Data

  Map<String, String> header = {
    'Host': 'www.secanonm.in',
    'User-Agent':
        'Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0',
    'Accept':
        'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
    'Accept-Language': 'en-US,en;q=0.5',
    'Accept-Encoding': 'gzip, deflate, br',
    'Connection': 'keep-alive'
  };
  Map<String, String> query = {"name": "sidhu patil"};
  HttpResponse req = await HttpRequests.post("https://www.secanonm.in",
      headers: header, data: query);
  print(req.status);
}
11
likes
0
pub points
77%
popularity

Publisher

verified publishermailbyproton.tech

HTTP Requests Package Inspired By Python Requests Module Which Is Used For To Make Http Request And Get Response. You Can Use It In Rest Api

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http

More

Packages that depend on http_requests