map method

  1. @override
PHttpMethod map(
  1. HttpMethod source
)

Maps a source object to the target type

source - The source object to map

Implementation

@override
PHttpMethod map(HttpMethod source) {
  return switch (source) {
    HttpMethod.put => PHttpMethod.put,
    HttpMethod.get => PHttpMethod.get,
    HttpMethod.post => PHttpMethod.post,
    HttpMethod.delete => PHttpMethod.delete,
    HttpMethod.patch => PHttpMethod.patch,
    HttpMethod.head => PHttpMethod.head,
    HttpMethod.options => PHttpMethod.options,
  };
}