maestro-server/discovery-api

View on GitHub
share/doc/pycurl/examples/quickstart/follow_redirect.py

Summary

Maintainability
A
0 mins
Test Coverage
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl

c = pycurl.Curl()
# Redirects to https://www.python.org/.
c.setopt(c.URL, 'http://www.python.org/')
# Follow redirect.
c.setopt(c.FOLLOWLOCATION, True)
c.perform()
c.close()