HttpRule constructor

HttpRule({
  1. String? selector,
  2. String? get,
  3. String? put,
  4. String? post,
  5. String? delete,
  6. String? patch,
  7. String? body,
  8. CustomHttpPattern? custom,
  9. Iterable<HttpRule>? additionalBindings,
  10. String? responseBody,
})

Implementation

factory HttpRule({
  $core.String? selector,
  $core.String? get,
  $core.String? put,
  $core.String? post,
  $core.String? delete,
  $core.String? patch,
  $core.String? body,
  CustomHttpPattern? custom,
  $core.Iterable<HttpRule>? additionalBindings,
  $core.String? responseBody,
}) {
  final _result = create();
  if (selector != null) {
    _result.selector = selector;
  }
  if (get != null) {
    _result.get = get;
  }
  if (put != null) {
    _result.put = put;
  }
  if (post != null) {
    _result.post = post;
  }
  if (delete != null) {
    _result.delete = delete;
  }
  if (patch != null) {
    _result.patch = patch;
  }
  if (body != null) {
    _result.body = body;
  }
  if (custom != null) {
    _result.custom = custom;
  }
  if (additionalBindings != null) {
    _result.additionalBindings.addAll(additionalBindings);
  }
  if (responseBody != null) {
    _result.responseBody = responseBody;
  }
  return _result;
}