Community & Support

New module needs to return very short message (e.g. 'OK') instead of full Drupal Page

I am sure I am overlooking something obvious or simple, but in my quest to build an external authentication server on Drupal, I have a need to provide a very simple http response to an HTTP GET request.

I assume it is possible. Can I just change something in the module declarations, or is it more complex?

$items['member/verify'] = array(
    'title' => 'Valids',
    'page callback' => 'my_id_verify_me',
    'access arguments' => array('access content')
  );

Thanks!

Comments

print instead of returning a

print instead of returning a value.

That seems to do it.

Is that ordinary behavior, or am I exploiting an undocumented feature?

Thanks!

---------------------

"He's said to be outspoken, but nobody's actually seen anyone do it"

It may be both :)

It may be both :) Seriously it is how it works (javascript that uses callback reply on it).

OK! Good enough for me!

Thanks!

---------------------

"He's said to be outspoken, but nobody's actually seen anyone do it"
nobody click here