cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • Use JMP Clinical with CDISC-compliant data. Review studies, ID safety and efficacy signals & communicate findings with interactive graphics. Register to see how. Aug. 27, 2 pm US ET.

Uncharted

Choose Language Hide Translation Bar
Craige_Hales
Super User
Web site wants a password

Question from @billkopp.

Using cURL to supply basic authentication credentials.  Replace "user" and "pass"  appropriately.  Remove the -k if you don't need it; it bypasses the checking for a valid signing authority on an https site's certificate (you probably know if you are using a self-signed certificate...then you'll need it).  DO use https if available; it will keep others from seeing the password...unless your script is left on your screen...

The example assumes Windows users put a copy of curl.exe on the desktop.  Mac users are good to go.

The last two lines open the downloaded CSV in JMP and do some basic error reporting.

 

 

if( HostIs("Windows"),
  data = RunProgram(
  executable( Convert File Path( "$desktop", windows ) || "curl.exe" ),
  options( "-k -s -u user:pass --basic https://example.com/demo/demo.csv" ),
  readfunction( "blob" )
  );
, // else mac version
  data = RunProgram(
  executable( "/usr/bin/curl" ),
  options( {"-k", "-s", "-u", "user:pass", "--basic", "https://example.com/demo/demo.csv"} ),
  readfunction( "blob" )
  );
);
 
try( dt = open(data, "text"); error="", error=exception_msg; dt=empty() );
show(dt,error);

 

 

Last Modified: Nov 16, 2016 3:13 PM