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 6103945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:47:11+00:00 2026-05-23T13:47:11+00:00

I use httplib.HTTPConnection within my app. Do I really need to provide host parameter

  • 0

I use httplib.HTTPConnection within my app. Do I really need to provide host parameter in httplib.HTTPConnection constructor? If so, why? (I mean, I know that it’s a mandatory parameter, but I wonder if I could specify None or empty string) And is there any global constant in Google AppEngine and in development server which I can use within my app in order to omit explicitly defined host.

  • 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-05-23T13:47:11+00:00Added an answer on May 23, 2026 at 1:47 pm

    If you leave it out of the constructor, how will the other methods know where to send their messages?

    The address/name of the server you’re connecting to is the parameter for the HTTPConnection, the URI on that server is what goes into request.

    From the python documentation (which is the basis for AppEngine)

    h1 = httplib.HTTPConnection(host[, port[, strict[, timeout[, source_address]]]])
    h1.request(method, url[, body[, headers]])
    

    [edit]

    Remember, it may not always be you who is responsible for this code. Also, why complicate things by including so much more information in the URI when you’re (for example) making calls to numerous URI’s on the same website?

    [/edit]

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

Sidebar

Related Questions

When would someone use httplib and when urllib? What are the differences? I think
I'm writing a dead link detector and wondering which lib i should use, httplib
I use httplib.HTTPSConnection with private key: h = httplib.HTTPSConnection(url, key_file='../cert/priv.pem', cert_file='../cert/srv_test.crt') Then I am
I'm trying to use httplib's HTTPSConnection for client validation, using a PKCS #12 certificate.
>>> import httplib >>> conn = httplib.HTTPConnection(www.google.com) >>> conn.request(HEAD, /index.html) >>> res = conn.getresponse()
I have a tornado server that provide an https connection with a self signed
I know how to develop in Android and use the Apache HTTP lib, but
I know how to do a HEAD request with httplib, but I have to
use case example I have a servlet that is receiving login requests. If a
I'm trying to use httplib to send credit card information to authorize.net. When i

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.