Explanation: A. It addresses a service deployed at localhost (the host where the code is run).
This statement is true because localhost is a special hostname that refers to the local machine or the current host where the code is run. It is equivalent to using the IP address 127.0.0.1, which is the loopback address of the network interface. By using localhost as the hostname, the invocation addresses a service that is deployed on the same machine as the client.
D. It addresses a service listening at port 3000.
This statement is true because port 3000 is the part of the URL that follows the colon after the hostname. It specifies the port number where the service is listening for incoming requests. A port number is a 16-bit integer that identifies a specific process or application on a host. By using port 3000, the invocation addresses a service that is listening at that port.
B. It addresses a service whose timeout is set to 3000 ms.
This statement is false because timeout is not a part of the URL, but a parameter that can be passed to the requests.get () function in Python. Timeout specifies how long to wait for the server to send data before giving up. It is measured in seconds, not milliseconds. By using timeout=3, the invocation sets the timeout to 3 seconds, not 3000 ms.
C. It addresses a service located at the following address local.host.com.
This statement is false because local.host.com is not the same as localhost. Local.host.com is a fully qualified domain name (FQDN) that consists of three parts: local, host, and com. It requires DNS resolution to map it to an IP address. Localhost, on the other hand, is a special hostname that does not require DNS resolution and always maps to 127.0.0.1. By using localhost as the hostname, the invocation does not address a service located at local.host.com.
References:
https://docs.python.org/3/library/requests.html : https://en.wikipedia.org/wiki/Localhost : https://en.wikipedia.org/wiki/Port_(computer_networking) : https://en.wikipedia.org/wiki/Fully_qualified_domain_name