Home > Back-end >  How do I perform a GET request on this URL? Flutter/Dart
How do I perform a GET request on this URL? Flutter/Dart

Time:07-28

I am trying to perform a GET request on this URL but I am not sure on how to go about it, not sure how to do it with the parameters if needed as well.

This is the url :

http://192.168.1.4:8080/HongLeong/RUN_HYPERLINK.do?_dc=1658998611394&hyper_classid=25510&hyper_id=2&hyper_mad_key=0&refer_classid=25510&refer_id=2&refer_mad_key=32835&table_id=25510&is_ctrl_pressed=0&isSearchParamForm=0&load_UserParameterInContext=1&ViewType=RUN_HYPERLINK&gui_open_popup=1&cell_context_id=537621&id_Window=5&activeWindowId=mw_5&noOrigUserDate=true&LocalDate=20220728&LocalTime=16565100&TimeZone=Asia/Shanghai&UserDate=0&UserTime=0&server_name=OPRISK_DATACOLLECTOR&key_id_list=536875&id_Desktop=100269&operation_key=1000009&operation_sub_num=-1&is_json=1&is_popup=0&is_search_window=0&ccsfw_conf_by_user=0&is_batch=0&reset_context=0&previousToken=1658998589864&historyToken=1658998611391&historyUrl=1

CodePudding user response:

You just need to use the get function from the HTTP package. Here is a little example.

import 'package:http/http.dart' as http;

var url = Uri.parse(YOUR_URL);
var response = await http.get(url);
  • Related