code: function parseAllowedMethods (allowMethodsHeader, acceptPatchHeader) {
    let allowedMethods = {}
  
    if (allowMethodsHeader) {
      let verbs = allowMethodsHeader.split(',')
      verbs.forEach((methodName) => {
        if (methodName && allowMethodsHeader.indexOf(methodName) >= 0) {
          allowedMethods[methodName.trim().toLowerCase()] = true
        }
      })
    }
  
    if (acceptPatchHeader &&
        acceptPatchHeader.indexOf('application/sparql-update') >= 0) {
      allowedMethods.patch = true
    }
  
    return allowedMethods
  }
docs: Extracts the allowed HTTP methods from the 'Allow' and 'Accept-Patch'
  headers, and returns a hashmap of verbs allowed by the server
  @method parseAllowedMethods
  
  @param allowMethodsHeader {string} `Access-Control-Allow-Methods` response
  header
  @param acceptPatchHeader {string} `Accept-Patch` response header
  
  @return {Object} Hashmap of verbs (in lowercase) allowed by the server for
  the current user. Example:
  ```
  {
  'get': true,
  'put': true
  }
  ```