getParam method

dynamic getParam(
  1. String key, {
  2. dynamic defaultValue,
})

Get parameter with matching key or return default value

Implementation

dynamic getParam(String key, {dynamic defaultValue}) async {
  switch (method) {
    case put:
    case post:
    case patch:
    case delete:
      return getPayload(key, defaultValue: defaultValue);
    case get:
    default:
      return getQuery(key, defaultValue: defaultValue);
  }
}