What does %5B and %5D in POST requests stand for?

As per this answer over here: str=”foo%20%5B12%5D” encodes foo [12]: %20 is space %22 is quotes %5B is ‘[‘ and %5D is ‘]’ This is called percent encoding and is used in encoding special characters in the url parameter values. EDIT By the way as I was reading https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURI#Description, it just occurred to me why … Read more

Make an HTTP request with android

UPDATE This is a very old answer. I definitely won’t recommend Apache’s client anymore. Instead use either: Retrofit OkHttp Volley HttpUrlConnection Original Answer First of all, request a permission to access network, add following to your manifest: <uses-permission android:name=”android.permission.INTERNET” /> Then the easiest way is to use Apache http client bundled with Android: HttpClient httpclient … Read more

How to send HTTP request in java? [duplicate]

You can use java.net.HttpUrlConnection. Example (from here), with improvements. Included in case of link rot: public static String executePost(String targetURL, String urlParameters) { HttpURLConnection connection = null; try { //Create connection URL url = new URL(targetURL); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod(“POST”); connection.setRequestProperty(“Content-Type”, “application/x-www-form-urlencoded”); connection.setRequestProperty(“Content-Length”, Integer.toString(urlParameters.getBytes().length)); connection.setRequestProperty(“Content-Language”, “en-US”); connection.setUseCaches(false); connection.setDoOutput(true); //Send request DataOutputStream wr = new … Read more

The request was aborted: Could not create SSL/TLS secure channel

I finally found the answer (I haven’t noted my source but it was from a search); While the code works in Windows XP, in Windows 7, you must add this at the beginning: // using System.Net; ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; // Use SecurityProtocolType.Ssl3 if needed for compatibility reasons And now, it works perfectly. … Read more

Send HTTP POST request in .NET

There are several ways to perform HTTP GET and POST requests: Method A: HttpClient (Preferred) Available in: .NET Framework 4.5+, .NET Standard 1.1+, and .NET Core 1.0+. It is currently the preferred approach, and is asynchronous and high performance. Use the built-in version in most cases, but for very old platforms there is a NuGet … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)