Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3699172
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:04:15+00:00 2026-05-19T05:04:15+00:00

I have a Drupal module that talks to a REST API on a separate

  • 0

I have a Drupal module that talks to a REST API on a separate server for user registration and authentication. The module runs on multiple sites which point to different servers which may run different versions of the REST API.

Ideally, I’d like to be able to run each site against its own end-point, in case changes on the back end break things. Is there a way to dynamically specify a different end-point URL when running a test? Or do I have to edit the .test file for each site?

I’m trying to keep the module’s files as generic and flexible as possible. I guess I could have the .test file look for a .inc file that could override the URL, if needed for a particular site. Is there a better way though?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T05:04:15+00:00Added an answer on May 19, 2026 at 5:04 am

    You can use a variable, using variable_get, and define the site url in settings.php, using a $conf override:

    In the .test file: variable_get('endpoint_url', NULL); and in settings.php: $conf['endpoint_url'] = 'http://foo/bar';. That way, for each site, you need only edit settings.php.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I understand the Drupal Services Module, and have node creation, and user authentication working.
I have custom drupal module. I receive result from a webservice that I need
Drupal 6.x I have this module that manages four different content types. For that
I have a Drupal 7 module that creates a custom node type. It's working,
I have created a module that works on a vanilla installation of Drupal but
I have a module that displays an alert to a user, inside of a
I have a normal Drupal User. I have used the content_profile module to create
I have a drupal module that requires other files from the web. Is it
I am trying to install a drupal 7 module. It says that I have
So I have the following function in my drupal module. I want to submit

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.