module WolfCore::HttpDataSource

def http_patch(url:, headers: {}, query: nil, body: nil)

def http_patch(url:, headers: {}, query: nil, body: nil)
  headers['Content-Type'] ||= 'application/json'
  body = body&.to_json if headers['Content-Type'] == 'application/json'
  HTTParty.patch(url, headers: headers, query: query, body: body)
end