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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:35:22+00:00 2026-05-16T21:35:22+00:00

I want to write a simple SSL HTTP client in Python and have heard

  • 0

I want to write a simple SSL HTTP client in Python and have heard about the Twisted framework.

I need to be able to authenticate with a REST service – so I was thinking I’d just POST a user name and password to the target server. Assuming authentication is successful, the client will receive a cookie.

Will an HTTP client built on Twisted automatically resend the cookie header for each subsequent request, or do I need to do something special? I’ve never used Twisted before.

Thanks

  • 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-16T21:35:23+00:00Added an answer on May 16, 2026 at 9:35 pm

    Will an HTTP client built on Twisted automatically resend the cookie header for each subsequent request, or do I need to do something special?

    “an HTTP client built on Twisted” will do anything it is built to do – just like, presumably any X built on any Y will do whatever it was built to do. 🙂 So I might suggest that this isn’t the question you really care about the answer to.

    Since Twisted 11.1.0, twisted.web.client.CookieAgent accepts a cookieJar argument which does two things:

    • it defines the cookies which are available to be sent with the requests
    • it stores new cookies received from servers in responses

    The soon-to-be-deprecated twisted.web.client.getPage accepts a cookies argument behaves similarly.

    So if you use CookieAgent then the cookie will be persisted and sent with subsequent requests, providing the authentication behavior you’re after.

    You could also do something with getPage but given its impending doom you probably shouldn’t.

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

Sidebar

Related Questions

I want to write a simple web framework myself using WSGI, Python. I am
I want to write a Simple P2P RDP Client and Server in Python. This
I want to write a simple regular expression in Python that extracts a number
I want to write a simple python script that send a EML file exported
I want to write simple counter for links/tags. So I have tags and random
I want to write a simple client-server application using corba and java. I'm using
I want to write a simple chat-client in Ruby for the terminal. The Problem
I want to write a simple P2P test app which uses HTTP as underlying
I want to write a simple web page in .jsp file. I need to
I want write a simple query which will fetch data from a table (which

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.