[Mailman-Users] Unable to call REST API through Java or Postman

Rohit Narurkar rohitnarurkar at gmail.com
Wed Mar 16 23:56:00 EDT 2016


I have setup Mailman just as it has been described in the documentation and
installation instructions. I am working in a Python Virtual Environment,
and have also made necessary changes in the "mailman.cfg" to add [mta]
information. I can now run Python shell and access the REST API calls. For
example, I can run "dump_json('http://localhost:8001/3.0/domains', None,
None, 'restadmin', 'restpass')" to list all domains.
I have also tried to follow another way, which works fine for me:
>>> from httplib2 import Http
>>> headers = {
...     'Content-Type': 'application/x-www-form-urlencode',
...     'Authorization': 'Basic cmVzdGFkbWluOnJlc3RwYXNz',
...     }
>>> url = 'http://localhost:8001/3.0/domains'
>>> response, content = Http().request(url, 'GET', None, headers)

And the content gives me the right expected value.
Now, I am trying to make calls to the REST API through the Rest Template in
Spring Java, and also through Postman.
In Postman, I am adding 2 key-values in the 'headers', Content-Type and
Authorization. And I am making a GET request to "
http://localhost:8001/3.0/domains". Whenever I try this, the Mailman stops
responding and I do not get any response. I cannot even call the REST API
through Python until the Postman request is cancelled.

Any help would be appreciated.

Thank you.

More information about the Mailman-Users mailing list