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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:33:06+00:00 2026-06-01T21:33:06+00:00

I am trying to POST wih curl some data. The source data is in

  • 0

I am trying to POST wih curl some data. The source data is in JSON, but I want to post with content-type application/x-www-form-urlencoded. I am trying to do it like this:

curl -X POST $URL --data-urlencode "@$data.json" --header "Content-Type: application/x-www-form-urlencoded"

This is data.json:

{
  "action"      : "deploy_from_scratch_with_bundle",
  "pusher"      : { "email" : "my@email.com" },
  "ref"         : "refs/heads/master",
  "repo_choice" : "LOCAL"
}

But this is not working: urlparse.parse_qs (python) is complaining about ValueError.

The received data (before parse_qs) is:

%7B%0A%20%20%22action%22%20%20%20%20%20%20%3A%20%22deploy%5Ffrom%5Fscratch%5Fwith%5Fbundle%22%2C%0A%20%20%22pusher%22%20%20%20%20%20%20%3A%20%7B%20%22email%22%20%3A%20%22my%40email%2Ecom%22%20%7D%2C%0A%20%20%22ref%22%20%20%20%20%20%20%20%20%20%3A%20%22refs%2Fheads%2Fmaster%22%2C%0A%20%20%22repo%5Fchoice%22%20%3A%20%22LOCAL%22%0A%7D%0A

What am I doing wrong here?

  • 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-01T21:33:08+00:00Added an answer on June 1, 2026 at 9:33 pm

    You should use unquote from urllib2 to unquote that data:

    In [10]: urllib2.unquote("%7B%0A%20%20%22action%22%20%20%20%20%20%20%3A%20%22deploy%5Ffrom%5Fscratch%5Fwith%5Fbundle%22%2C%0A%20%20%22pusher%22%20%20%20%20%20%20%3A%20%7B%20%22email%22%20%3A%20%22my%40email%2Ecom%22%20%7D%2C%0A%20%20%22ref%22%20%20%20%20%20%20%20%20%20%3A%20%22refs%2Fheads%2Fmaster%22%2C%0A%20%20%22repo%5Fchoice%22%20%3A%20%22LOCAL%22%0A%7D%0A")
    Out[10]: '{\n  "action"      : "deploy_from_scratch_with_bundle",\n  "pusher"      : { "email" : "my@email.com" },\n  "ref"         : "refs/heads/master",\n  "repo_choice" : "LOCAL"\n}\n'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I noticed when trying to post form data in JSON format, that the following
I'm trying to post to the login form of an application on another subdomain
im trying to POST (cross domain) some data to a jersey web service and
i am trying to post some data on a pop-up div using jquery ,
Im trying to post a form data in js : I have this code
I'm trying to post data with jQuery in an asp.net application to a popup.
I am trying to post to my facebook page wall using curl but i
I am trying to post the following JSON data to an Action method on
I am trying to POST data to a JSON webservice. I can succeed if
I am trying to post some data to a ASP.NET MVC Controller Action. Current

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.