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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:22:02+00:00 2026-06-01T16:22:02+00:00

I have a service listening to github service hooks, to perform automatic deployment. Sometimes

  • 0

I have a service listening to github service hooks, to perform automatic deployment. Sometimes I need to trigger this manually (without github intervention). For that, I am emulating the POST request that github is sending (post-receive-URLs).

My data (my.json) looks like this (a limited subset of what github is sending – I do not need more):

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

And I try to POST with curl:

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

The problem is that github is POSTing like this:

payload=%7B%22pusher%22%3A%7B%22name%22%3A%22none%22%7D%2C%22repository%22%3
A%7B%22name%22%3A%liferay-plugins%22%2C%22created_at%22%3A%222011%2F12%2F07%2011%3A52...

See that payload= there? This looks like a form field. I do not know how to combine form fields with urlencoding. To POST form fields, I would do it like this:

curl -X POST $URL -F "payload=@my.json"

But the JSON would not be url encoded. How to I get both?

  • 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-01T16:22:03+00:00Added an answer on June 1, 2026 at 4:22 pm

    curl $URL --data-urlencode payload@my.json

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

Sidebar

Related Questions

I have a windows service listening to messages from a queue but the messages
I currently have service classes that look something like this public class UserService :
I have a service that sometimes calls a batch file. The batch file takes
I have a service that is listening to some events. When that event happens,
I have a receive thread listening with the BluetoothServerSocket accept() call. This thread will
I have WCF service hosted by Windows service. This is my app.config file (server-side)
I have a windows service written around some code similar to this Asynchronous Server
I have a udp service which is listening on a socket for udp datagrams:
I have a wcf service that uses the WsHttpBinding as a binding. This service
I have an independent JMS listening and Responding service. I want to invoke it

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.