Which of the following method sends input to a script via a URL?

  1. Get

  2. Post

  3. Both

  4. None


Correct Option: A

AI Explanation

To answer this question, you need to understand the difference between the GET and POST methods in web development.

Option A) Get - This option is correct because the GET method is used to send input to a script via a URL. When using the GET method, the data is appended to the URL as query parameters. This method is commonly used for retrieving data or requesting information from a server.

Option B) Post - This option is incorrect because the POST method is used to send data to the server as part of the request body, rather than appending it to the URL. The POST method is commonly used for submitting data to a server, such as when submitting a form.

Option C) Both - This option is incorrect because although both the GET and POST methods can be used to send input to a script, the question specifically asks for the method that sends input via a URL, which is the GET method.

Option D) None - This option is incorrect because the GET method does send input to a script via a URL, as explained above.

The correct answer is Option A) Get. This option is correct because the GET method is used to send input to a script via a URL.

Find more quizzes: