Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8341435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:28:49+00:00 2026-06-09T05:28:49+00:00

I am using httplib.HTTPConnection (http://ipaddr:port) conn.request(GET, , params, headers) I am able to do

  • 0

I am using

httplib.HTTPConnection ("http://ipaddr:port")  
conn.request("GET", "", params, headers)

I am able to do PUT/GET using ipaddr:port using my firefox client!!.
But I am seeing this error on execution of the script:

 File "post_python.py", line 5, in <module>
    conn.request("GET", "", params, headers)
  File "/usr/lib64/python2.6/httplib.py", line 914, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.6/httplib.py", line 951, in _send_request
    self.endheaders()
  File "/usr/lib64/python2.6/httplib.py", line 908, in endheaders
    self._send_output()
  File "/usr/lib64/python2.6/httplib.py", line 780, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.6/httplib.py", line 739, in send
    self.connect()
  File "/usr/lib64/python2.6/httplib.py", line 720, in connect
    self.timeout)
  File "/usr/lib64/python2.6/socket.py", line 553, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno -2] Name or service not known"

Please can someone help me ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:28:50+00:00Added an answer on June 9, 2026 at 5:28 am

    Try this instead (without “http://” before the IP address):

    conn = httplib.HTTPConnection("x.x.x.x", port)  
    conn.request("GET", "", params, headers)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using httplib and django. When I do the following: conn.request(PUT, /udj/users/3/library/songs, headers={X-Udj-Ticket-Hash :
import httplib conn = httplib.HTTPConnection(head) conn.request(HEAD,tail) res = conn.getresponse() print res.status I am currently
Using the Redis info command, I am able to get all the stats of
I am writing a client in Python 2.7.2 using httplib to fetch urls from
I'm trying to use httplib's HTTPSConnection for client validation, using a PKCS #12 certificate.
To be more specific, I'm using python and making a pool of HTTPConnection (httplib)
Is it possible to put multiple requests without breaking the connection using python httplib?.
I have a web service that accepts passed in params using http POST but
I have code which issues many HTTP GET requests using Python's urllib2, in several
params = urllib.urlencode(data) headers = {Content-type: application/x-www-form-urlencoded, Accept: text/plain, } conn = httplib.HTTPConnection(self.base_url) conn.request('GET',

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.