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

HTTP Requests Package is inspired by the `Python Requests Module`, which is used to make HTTP requests and get responses. You can use it in your `Rest API`.

example/example.dart

import 'package:http_requests/http_requests.dart';

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

  // Post Method With Headers And Data
  Map<String, String> header = {
    'Host': 'www.google.in',
    'User-Agent':
        'Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0',
    'Accept': 'text/html',
    '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.google.in",
      headers: header, data: query);
  print(req.response);
}
11
likes
160
points
112
downloads

Publisher

verified publishermailbyproton.tech

Weekly Downloads

HTTP Requests Package is inspired by the `Python Requests Module`, which is used to make HTTP requests and get responses. You can use it in your `Rest API`.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on http_requests