]> git.proxmox.com Git - mirror_edk2.git/blob - ShellPkg/DynamicCommand/HttpDynamicCommand/Http.uni
ShellPkg/DynamicCommand: add HttpDynamicCommand
[mirror_edk2.git] / ShellPkg / DynamicCommand / HttpDynamicCommand / Http.uni
1 // /**
2 //
3 // (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
4 // Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
5 // Copyright (c) 2020, Broadcom. All rights reserved.<BR>
6 // SPDX-License-Identifier: BSD-2-Clause-Patent
7 //
8 // Module Name:
9 //
10 // Http.uni
11 //
12 // Abstract:
13 //
14 // String definitions for UEFI Shell HTTP command
15 //
16 //
17 // **/
18
19 /=#
20
21 #langdef en-US "english"
22
23 #string STR_GEN_TOO_MANY #language en-US "%H%s%N: Too many arguments. Try help http.\r\n"
24 #string STR_GEN_TOO_FEW #language en-US "%H%s%N: Too few arguments. Try help http.\r\n"
25 #string STR_GEN_PARAM_INV #language en-US "%H%s%N: Invalid argument - '%H%s%N'. Try help http.\r\n"
26 #string STR_GEN_PROBLEM #language en-US "%H%s%N: Unknown flag - '%H%s%N'. Try help http.\r\n"
27 #string STR_GEN_FILE_OPEN_FAIL #language en-US "%H%s%N: Cannot open file - '%H%s%N'\r\n"
28 #string STR_GEN_CRLF #language en-US "\r\n"
29
30 #string STR_HTTP_ERR_NO_NIC #language en-US "No network interface card found.\r\n"
31 #string STR_HTTP_ERR_NIC_NAME #language en-US "Failed to get the name of the network interface card number %d - %r\r\n"
32 #string STR_HTTP_ERR_OPEN_PROTOCOL #language en-US "Unable to open HTTP protocol on '%H%s%N' - %r\r\n"
33 #string STR_HTTP_ERR_CONFIGURE #language en-US "Unable to configure HTTP protocol on '%H%s%N' - %r\r\n"
34 #string STR_HTTP_ERR_DOWNLOAD #language en-US "Unable to download the file '%H%s%N' on '%H%s%N' - %r\r\n"
35 #string STR_HTTP_ERR_WRITE #language en-US "Unable to write into file '%H%s%N' - %r\r\n"
36 #string STR_HTTP_ERR_NIC_NOT_FOUND #language en-US "Network Interface Card '%H%s%N' not found.\r\n"
37 #string STR_HTTP_ERR_STATUSCODE #language en-US "\r'%H%s%N' reports '%s' for '%H%s%N' \r\n"
38 #string STR_HTTP_DOWNLOADING #language en-US "Downloading '%H%s%N'\r\n"
39
40 #string STR_GET_HELP_HTTP #language en-US ""
41 ".TH http 0 "Download a file from HTTP server."\r\n"
42 ".SH NAME\r\n"
43 "Download a file from HTTP server.\r\n"
44 ".SH SYNOPSIS\r\n"
45 " \r\n"
46 "HTTP [-i interface] [-l port] [-t timeout] [-s size] [-m] [-k]\r\n"
47 " <URL> [localfilepath]\r\n"
48 ".SH OPTIONS\r\n"
49 " \r\n"
50 " -i interface - Specifies an adapter name, i.e., eth0.\r\n"
51 " -k Keep the downloaded file even if there was an error.\r\n"
52 " If this parameter is not used, the file will be deleted.\r\n"
53 " -l port - Specifies the local port number. Default value is 0\r\n"
54 " and the port number is automatically assigned.\r\n"
55 " -m Measure and report download time (in seconds). \r\n"
56 " -s size The size of the download buffer for a chunk, in bytes.\r\n"
57 " Default is 32K. Note that larger buffer does not imply\r\n"
58 " better speed.\r\n"
59 " -t timeout - The number of seconds to wait for completion of\r\n"
60 " requests and responses. Default is 0 which is 'automatic'.\r\n"
61 " %HURL%N\r\n"
62 " Two types of providing of URLs are supported:\r\n"
63 " 1. tftp-like, where host and http_uri are separate parameters\r\n"
64 " (example: host /host_uri), and\r\n\"
65 " 2. wget-like, where host and host_uri is one parameter.\r\n"
66 " (example: host/host_uri)\r\n"
67 "\r\n"
68 " host - Specifies HTTP Server address.\r\n
69 Can be either IPv4 address or 'http (or https)://addr'\r\n
70 Can use addresses resolvable by DNS as well. \r\n
71 Port can be specified after ':' if needed. \r\n
72 By default port 80 is used.\r\n"
73 " http_uri - HTTP server URI to download the file.\r\n"
74 "\r\n"
75 " localfilepath - Local destination file path.\r\n"
76 ".SH DESCRIPTION\r\n"
77 " \r\n"
78 "NOTES:\r\n"
79 " 1. The HTTP command allows geting of the file specified by its 'http_uri'\r\n"
80 " path from the HTTP server specified by its 'host' IPv4 address. If the\r\n"
81 " optional 'localfilepath' parameter is provided, the downloaded file is\r\n"
82 " stored locally using the provided file path. If the local file path is\r\n"
83 " not specified, the file is stored in the current directory using the file\r\n"
84 " server's name.\r\n"
85 " 2. Before using the HTTP command, the network interface intended to be\r\n"
86 " used to retrieve the file must be configured. This configuration may be\r\n"
87 " done by means of the 'ifconfig' command.\r\n"
88 " 3. If a network interface is defined with the '-i' option then only this\r\n"
89 " interface will be used to retrieve the remote file. Otherwise, all network\r\n"
90 " interfaces are tried in the order they have been discovered during the\r\n"
91 " DXE phase.\r\n"
92 ".SH EXAMPLES\r\n"
93 " \r\n"
94 "EXAMPLES:\r\n"
95 " * To get the file "dir1/file1.dat" from the HTTP server 192.168.1.1, port 8080, and\r\n"
96 " store it as file2.dat in the current directory (use tftp-like URL format) :\r\n"
97 " fs0:\> http 192.168.1.1:8080 dir1/file1.dat file2.dat\r\n"
98 " * To get the file /image.bin via HTTPS from server 192.168.1.1 at port 443 \r\n"
99 " (default HTTPS port), and store it in the current directory: \r\n"
100 " fs0:\> http https://192.168.1.1 image.bin\r\n"
101 " To get an index file from http://google.com and place it into the \r\n"
102 " current directory:\r\n"
103 " fs0:\> http google.com index.html\r\n"
104 ".SH RETURNVALUES\r\n"
105 " \r\n"
106 "RETURN VALUES:\r\n"
107 " SHELL_SUCCESS The action was completed as requested.\r\n"
108 " SHELL_INVALID_PARAMETER One of the passed-in parameters was incorrectly\r\n"
109 " formatted or its value was out of bounds.\r\n"
110 " HTTP_ERROR No EFI errors, but the server reported a status code\r\n"
111 " which should be treated as an error. If an error body sent\r\n"
112 " by the server, and -k parameter is on command line,
113 " the file wil be saved either as localfilepath filename,\r\n"
114 " or as an URI name in the current directory.\r\n"
115 " If '/' is at the end of the URL, and no locafilepath filename\r\n"
116 " is given on the command line, the file will be retrieved as\r\n"
117 " index.html.\r\n"