adjust http request method based on Drupal version