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

  • Home
  • SEARCH
  • 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 8660001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:08:48+00:00 2026-06-12T16:08:48+00:00

I am trying to post two parameters using HTTP POST-request to http://foo.bar.com/submit.jsp . This

  • 0

I am trying to post two parameters using HTTP POST-request to http://foo.bar.com/submit.jsp.

This works.

conn = httplib.HTTPConnection("www.bar.com")
conn.request("POST", "",parameters)

But this does not, could someone explain to me why it does not and how the correct way is?

conn = httplib.HTTPConnection("www.foo.bar.com")
conn.request("POST", "/submit.jsp", parameters)

I am getting this error

File "example.py", line 68, in <module>
    conn.request("POST", "/submit.jsp", parameters)
  File "/usr/lib/python2.7/httplib.py", line 958, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 992, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 776, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 757, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/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

Thanks in advance

  • 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-12T16:08:49+00:00Added an answer on June 12, 2026 at 4:08 pm

    Whatever hostname you are really using in place of www.foo.bar.com can not be resolved to an IP address. Note that your first example used www.bar.com, not www.foo.bar.com. While these are only examples, the second hostname that you are using is bad.

    The path /submit.jsp is not the problem here, if that is what you are actually trying to test?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying POST a check-in request in Google Places API. The way they described
Trying to post JSON data to Spring controller.. Not working at all JSP Code:
I am trying to post a URL to the server using the Asynchronous type
I have been trying to post using RestKit after I have successfully used it
I am trying to post an image to a Facebook album using a form
I'm trying to send a HTTP request to a servers interface. But I'm really
I'm trying to create a generic LINQ-TO-SQL repository based on this post which basically
I am trying to set-up a two step signup process using Devise in Rails
I'm trying to pass two parameters to an mvc controller from javascript. The first
I'm trying to do a fairly basic HTTP PUT using RestKit. I don't want

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.