set_header method

Map set_header(
  1. dynamic args
)

Updates header with the List of args and returns it

Implementation

Map set_header(args) {
  for (var i = 0; i < args.length; i += 2) {
    if (args[i] is String && args[i + 1] is String) {
      header[args[i]] = args[i + 1];
    }
  }
  return header;
}