(********************************************************************) (* *) (* gethttp.s7i Support to get data with the HTTP protocol *) (* Copyright (C) 2026 Thomas Mertes *) (* *) (* This file is part of the Seed7 Runtime Library. *) (* *) (* The Seed7 Runtime Library is free software; you can *) (* redistribute it and/or modify it under the terms of the GNU *) (* Lesser General Public License as published by the Free Software *) (* Foundation; either version 2.1 of the License, or (at your *) (* option) any later version. *) (* *) (* The Seed7 Runtime Library is distributed in the hope that it *) (* will be useful, but WITHOUT ANY WARRANTY; without even the *) (* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR *) (* PURPOSE. See the GNU Lesser General Public License for more *) (* details. *) (* *) (* You should have received a copy of the GNU Lesser General *) (* Public License along with this program; if not, write to the *) (* Free Software Foundation, Inc., 51 Franklin Street, *) (* Fifth Floor, Boston, MA 02110-1301, USA. *) (* *) (********************************************************************) include "http_request.s7i"; (** * Get data specified by a ''location'' using the HTTP protocol. * getHttp("example.com") * getHttp("www.example.com/index.html") * @param location Url without http:// at the beginning. * @return the string of data found, or "" if nothing was found. *) const func string: getHttp (in string: location) is return http(GET, location).body;