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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:08:26+00:00 2026-05-24T16:08:26+00:00

I am currently using PycURL to trigger a build in Jenkins, by posting to

  • 0

I am currently using PycURL to trigger a build in Jenkins, by posting to a certain URL. The relevant code looks as follows:

curl = pycurl.Curl()
curl.setopt(pycurl.URL, url)
# These are the form fields expected by Jenkins
data = [
        ("name", "CI_VERSION"),
        ("value", str(version)),
        ("name", "integration.xml"),
        ("file0", (pycurl.FORM_FILE, metadata_fpath)),
        ("json", "{{'parameter': [{{'name': 'CI_VERSION', 'value':"
            "'{0}'}}, {{'name': 'integration.xml', 'file': 'file0'}}]}}".
                format(version,)),
        ("Submit", "Build"),
        ]
curl.setopt(pycurl.HTTPPOST, data)
curl.perform()

As you can see, one of the post parameters (‘file0’) is a file, as indicated by the parameter type pycurl.FORM_FILE.

How can I replace my usage of PycURL with the standard Python library?

  • 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-24T16:08:27+00:00Added an answer on May 24, 2026 at 4:08 pm

    Standard python library has no support of multipart/form-data that required for post files through POST requests.

    There is some recipes eg http://code.activestate.com/recipes/146306-http-client-to-post-using-multipartform-data/

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

Sidebar

Related Questions

Currently using MySQL version 5.1.6 This is my first real world build and so
I currently using android NDK to write some native code in C. I have
Im currently using codeigniter to build a messaging system and im trying to stay
I am currently using the following code to search within Tridion. It is fetching
I am currently using this code: if (!Directory.Exists(command2)) Directory.CreateDirectory(command2); if (Directory.Exists(vmdaydir)) Directory.Delete(vmdaydir,true); if (!Directory.Exists(vmdaydir))
Currently using SASS on a website build. It is my first project using it,
Im currently using jQuery to build an Array like this: var arr = new
The code im currently using is this var focus; function focuswindow() { focus =
im currently using the SDL-devel-1.2.13-mingw32 library in code blocks 8.02. with the mingw 5.1.6
I'm currently using the following code in my cms to check if visitor is

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.