mirror of
https://github.com/vishapoberon/vipak.git
synced 2026-04-05 20:42:26 +00:00
Http fetch to file doesn't work for some reason
This commit is contained in:
parent
ab197c6483
commit
6c66d03769
6 changed files with 54 additions and 21 deletions
|
|
@ -2,21 +2,28 @@ MODULE PackageFileParser;
|
|||
IMPORT
|
||||
JsonParser,
|
||||
FileManager,
|
||||
http,
|
||||
Logger;
|
||||
CONST
|
||||
MAXARRAYNUMBER = 1000;
|
||||
MAXARRAYNUMBER = 1000000;
|
||||
PROCEDURE install*;
|
||||
VAR
|
||||
fileData: ARRAY MAXARRAYNUMBER OF CHAR;
|
||||
successfullyParsed: BOOLEAN;
|
||||
fileData, buff, buff2: ARRAY MAXARRAYNUMBER OF CHAR;
|
||||
success: BOOLEAN;
|
||||
BEGIN
|
||||
Logger.Log("Starting install process");
|
||||
successfullyParsed := FileManager.Read("VersionFile.json", fileData);
|
||||
success := FileManager.Read("VersionFile.json", fileData);
|
||||
|
||||
IF ~successfullyParsed THEN Logger.Log("Some ERROR occured while reading VERSIONFILE") END;
|
||||
ASSERT(successfullyParsed);
|
||||
IF ~success THEN Logger.Log("Some ERROR occured while reading VERSIONFILE") END;
|
||||
ASSERT(success);
|
||||
|
||||
Logger.Log(fileData);
|
||||
http.get("norayr.am", "/tmp/", "80", buff);
|
||||
http.getClean(buff, buff2);
|
||||
|
||||
success := FileManager.Write("index.html", buff2);
|
||||
|
||||
IF ~success THEN Logger.Log("Some ERROR occured while writing to test gile") END;
|
||||
ASSERT(success)
|
||||
END install;
|
||||
|
||||
BEGIN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue