# Making Requests

Once your proxy user is created, you can immediately test your connection.

<p align="center"><strong>Testing your proxy with cURL</strong></p>

You can quickly check if your proxy is working by sending a request through it using `curl`.\
This is especially useful to confirm:

* Your proxy is active
* Your credentials are correct
* The IP being returned is the proxy IP (not your local IP)

A simple way to test is by using **ipinfo.io**, which returns details about the IP your request is coming from.

```
curl -x res-v2.pr.plainproxies.com:8080 -U USERNAME:PASSWORD ipinfo.io
```

Replace **USERNAME** and **PASSWORD** with your proxy credentials.

If everything is correct, the response will show the **Residential Proxy IP**, along with country, region, and ASN details.

Find more code examples in other code languages below:

{% tabs %}
{% tab title="Python" %}

```
import requests

proxies = {
    'http': 'http://username:password@res-v2.pr.plainproxies.com:8080',
    'https': 'http://username:password@res-v2.pr.plainproxies.com:8080'
}

response = requests.get('https://ip.plainproxies.com/', proxies=proxies)
print(response.json())
```

{% endtab %}

{% tab title="Go" %}

```
package main

import (
    "fmt"
    "net/http"
    "net/url"
)

func main() {
    proxy, _ := url.Parse("http://username:password@res-v2.pr.plainproxies.com:8080")
    client := &http.Client{
        Transport: &http.Transport{
            Proxy: http.ProxyURL(proxy),
        },
    }
    
    resp, _ := client.Get("https://ip.plainproxies.com/")
    fmt.Println(resp.Status)
}
```

{% endtab %}

{% tab title="Node.js" %}

```
const axios = require('axios');

const proxy = {
  host: 'res-v2.pr.plainproxies.com',
  port: 8080,
  auth: {
    username: 'your-username',
    password: 'your-password'
  }
};

axios.get('https://ip.plainproxies.com/', { proxy })
  .then(res => console.log(res.data))
  .catch(err => console.error(err));
```

{% endtab %}

{% tab title="Java" %}

```
import java.net.*;
import java.io.*;

public class ProxyExample {
    public static void main(String[] args) throws Exception {
        Proxy proxy = new Proxy(Proxy.Type.HTTP,
            new InetSocketAddress("res-v2.pr.plainproxies.com", 8080));
        
        Authenticator.setDefault(new Authenticator() {
            protected PasswordAuthentication getPasswordAuthentication() {
                return new PasswordAuthentication(
                    "username", "password".toCharArray());
            }
        });
        
        URL url = new URL("https://ip.plainproxies.com/");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection(proxy);
        
        BufferedReader in = new BufferedReader(
            new InputStreamReader(conn.getInputStream()));
        String inputLine;
        while ((inputLine = in.readLine()) != null) {
            System.out.println(inputLine);
        }
        in.close();
    }
}
```

{% endtab %}

{% tab title="C#" %}

```
using System.Net;
using System.Net.Http;

class ResidentialProxy
{
    static async Task Main()
    {
        var proxy = new WebProxy
        {
            Address = new Uri("http://res-v2.pr.plainproxies.com:8080"),
            Credentials = new NetworkCredential("username", "password")
        };
        
        var handler = new HttpClientHandler 
        { 
            Proxy = proxy,
            UseProxy = true
        };
        
        using var client = new HttpClient(handler);
        var response = await client.GetAsync("https://ip.plainproxies.com/");
        Console.WriteLine($"Status: {response.StatusCode}");
    }
}
```

{% endtab %}

{% tab title="PHP" %}

```
?php
// Residential Proxy Example
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://ip.plainproxies.com/');
curl_setopt($ch, CURLOPT_PROXY, 'res-v2.pr.plainproxies.com:8080');
curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'username:password');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "HTTP Code: " . $httpCode . "\n";
echo $response;
?>
```

{% endtab %}

{% tab title="Ruby" %}

```
require 'net/http'
require 'uri'

uri = URI('https://ip.plainproxies.com/')
proxy_host = 'res-v2.pr.plainproxies.com'
proxy_port = 8080
proxy_user = 'username'
proxy_pass = 'password'

Net::HTTP.start(uri.host, uri.port,
  proxy_host, proxy_port, proxy_user, proxy_pass,
  use_ssl: true) do |http|
  request = Net::HTTP::Get.new(uri)
  response = http.request(request)
  puts response.body
end
```

{% endtab %}
{% endtabs %}

If your request does not return the proxy IP or fails to connect:

* Double-check your **username** and **password**
* Ensure your plan is active in the **dashboard**
* Try a different location or port if available


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.plainproxies.com/proxies/unlimited-residential-proxies/making-requests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
