Skip to main content
November 19, 2011
Question

MMHttp.getText() with basic authentication

  • November 19, 2011
  • 1 reply
  • 4128 views

Hi All,

I am creating a Dreamweaver Extension that pulls data from a website. I use MMHttp.getText() to retrieve a URL and the website uses basic authentication.

How do I specify username and password for MMHttp.getText() method?

I have tried using https://username:password@www.... type URL but still does not work.

Thank you.

Regards,

Nugroho

This topic has been closed for replies.

1 reply

Participating Frequently
November 21, 2011

The MMHttp object is very basic, if changing the URL didn't work (assuming it does work as expected when you try that same URL in a browser), then that type of authenticaion is likely not supported. Does it work with the HTTP (as in not HTTPS)? I believe that HTTPS support was added a couple of versions ago, so it's possible there are some limitations along that line.

Danilo Celic

November 22, 2011

I have tried the URL (that contains username and passowrd) in a browser and it works but it does not work using MMHttp.

Regarding HTTPS support, I tested using MMHttp to non-authenticated HTTPS  website and its works.

Participant
July 3, 2015

Which version of Dreamweaver are you working on, and which platform? I corresponded with a Dreamweaver engineer and they stated that it should be able to connect with basic authentication turned on for Windows versions of Dreamweaver, but probably not work at all on Mac. I set up my IIS7 on Windows 7 and set a folder on my localhost that was set to basic authentication and when I tried it the username and password dialog would appear. This would happen only the first time you access the authenticated URL in a Dreamweaver session; that is, once you close and restart Dreamweaver, and tried the URL again, the prompt would appear again. I tried this with and without the username and password in the URL and it always popped up a prompt dialog.

One suggestion might be to try conntecting to the authenticated page via an XHR object within a mm:browsercontrol:

http://help.adobe.com/en_US/dreamweaver/cs/extend/WS3825E1AD-223E-47e9-B86B-ECFBCC45BE0C.html

Search the Dreamweaver application configuration for examples of using the mm:browsercontrol, I beleive that the Spry Dataset Wizard uses that control.

Danilo Celic


Hello Danilo,

   I want to use mm:browsercontrol in Dreamweaver CC 2015 to call a remote web service using XHR/XMLHTTPRequest object. However, I do not know how to achieve this exactly. I browsed the Adobe help for mm:browsercontrol at : Adobe Dreamweaver CS5 & CS5.5 * <mm:browsercontrol> but could not find any clue of how to actually achieve this. Can you share some working sample example or guide me to any forums/sites that can help me?

Thanks a lot in advance.