How-to articles, tricks, and solutions about HTTP

laravel - get parameters from http request

In Laravel, you can use the $request object to access parameters from an HTTP request.

PHP CURL DELETE request

To send a DELETE request with PHP using cURL, you can use the following code:

PHP_SELF vs PATH_INFO vs SCRIPT_NAME vs REQUEST_URI

PHP_SELF, PATH_INFO, SCRIPT_NAME, and REQUEST_URI are all superglobal variables in PHP that provide information about the current URL being requested.

Post Requests with cURL

cURL is applied for making requests with different protocols. A post request can send user collected data to a server. Find out how to do that accurately.

Request string without GET arguments

In PHP, you can use the $_SERVER['REQUEST_URI'] variable to get the request string without GET arguments.

Sending HTTP POST Request In Java

To send an HTTP POST request in Java, you can use the java.net.URL and java.net.HttpURLConnection classes. Here is an example of how you can use these classes to send a POST request:

setcookie, Cannot modify header information - headers already sent

The error message "Cannot modify header information - headers already sent" typically occurs when a PHP script attempts to send a cookie or redirect the user's browser to a different page, but some output has already been sent to the browser.

Simple HTTP server in Java using only Java SE API

To create a simple HTTP server in Java using only the Java SE API, you can use the java.net package.

What is the quickest way to HTTP GET in Python?

Here's a code snippet for making an HTTP GET request using the requests library in Python:

1 2