Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.0 - Français

Change language to:
English - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.1.0. This page might be outdated.
See the recommended documentation of this function

Aide de Scilab >> Outils web > http_get


HTTP GET request.


[result, status] = http_get(url)
[result, status] = http_get(url, filename)
[result, status] = http_get(url, filename, <opt_args>)



A string containing the server address following by the optional port, the route of the request and query datas. syntax: "address:port/route?queryfield=querydata"


If this optional argument is given, the result will be written in the file. Can be used to download a file.


This represents a sequence of statements key1=value1, key2=value2, ... where key1, key2, ... can be one of the following:


This option determines whether Scilab verifies the authenticity of the peer's certificate. If none is given, no verification is performed.

Disabling verification of the certificate allows bad guys to man-in-the-middle the communication without you knowing it. Disabling verification makes the communication insecure. Just having encryption on a transfer is not enough as you cannot be sure that you are communicating with the correct end-point.


By default, follow is false. Set follow=%t to follow eventual redirections.


Username and password can be specified for the websites which required authentication.

The syntax is auth="username:password"


If a filename is given, result contains the path of the file. If not, result is a string which contain the server answer or a scilab variable if the answer is in JSON format.


HTTP response code.


This function will perform an HTTP GET request.

The proxy configuration is used if it's enabled in the Preferences under the rubric "Internet".


result = http_get("")

file = http_get("", TMPDIR+"/result");
file = http_get("", TMPDIR+"/result.html", follow=%t);
// then open the file in your browser

result = http_get("")

See also


6.1 Function introduced.
Report an issue
<< http_delete Outils web http_patch >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 25 08:50:46 CET 2020