Flutter - Handle status code 302 in POST request
问题 I'm trying to send a post request in Flutter with DIO package. Here is the request: getSessionId() async { var csrf = await getCsrftoken(); var dio = new Dio(new Options( baseUrl: "http://xxxxxxx/accounts/login/", connectTimeout: 5000, receiveTimeout: 100000, // 5s headers: { 'Cookie': "csrftoken=" + csrf }, contentType: ContentType.JSON, // Transform the response data to a String encoded with UTF8. // The default value is [ResponseType.JSON]. responseType: ResponseType.PLAIN )); var response