Also, the url is usually after all the switches. Not sure how strictly the 
format is checked.

Sent from my iPad

> On Aug 17, 2015, at 3:19 PM, Walter Kelt <[email protected]> wrote:
> 
> I think you need quote signs around each of the  -F items....such as -F 
> "git=test"
> 
> Sent from my iPad
> 
>> On Aug 17, 2015, at 3:15 PM, Greg Nifor <[email protected]> wrote:
>> 
>> curl -X POST localhost/job/Test/buildWithParameters -u user:pass -F git=test 
>> -F root=root1
>> 
>> 
>> 
>> 
>>> On Monday, August 17, 2015 at 12:11:08 PM UTC-7, walter.kelt wrote:
>>> Please paste your full curl command
>>> 
>>> Sent from my iPad
>>> 
>>>> On Aug 17, 2015, at 3:06 PM, Greg Nifor <[email protected]> wrote:
>>>> 
>>>> When I try that the variables are empty.
>>>> 
>>>>> On Monday, August 17, 2015 at 11:49:09 AM UTC-7, walter.kelt wrote:
>>>>> You need to use -F for file and -F for data.
>>>>> 
>>>>> Sent from my iPad
>>>>> 
>>>>>> On Aug 17, 2015, at 2:41 PM, Greg Nifor <[email protected]> wrote:
>>>>>> 
>>>>>> Is there a way to use curl to send both a file and string parameter. I 
>>>>>> can do each individually, but not together.
>>>>>> 
>>>>>> Works:
>>>>>> 
>>>>>> curl -X POST <jenkins_url>/job/<job>/buildWithParameters -u 
>>>>>> <user>:<password> -F file=@/path/to
>>>>>> 
>>>>>> curl -X POST <jenkins_url>/job/<job>/buildWithParameters -u 
>>>>>> <user>:<password> --data string0=foo --data string1=bar
>>>>>> 
>>>>>> Doesn't Work:
>>>>>> 
>>>>>> curl -X POST <jenkins_url>/job/<job>/buildWithParameters -u 
>>>>>> <user>:<password> -F file=@/path/to --data string0=foo --data string1=bar
>>>>>> 
>>>>>> The result I get is: Warning: You can only select one HTTP request!
>>>>>> 
>>>>>> 
>>>>>> Any ideas?
>>>>>> 
>>>>>> -- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "Jenkins Users" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>>> an email to [email protected].
>>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/jenkinsci-users/65067202-61bf-40b8-8509-376d5ae79589%40googlegroups.com.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>> 
>>>> -- 
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "Jenkins Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>>> email to [email protected].
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/jenkinsci-users/f0a472a1-78f1-4a96-a15c-cf116565cdf8%40googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/235cdbdb-cd11-46e2-ac6e-c51787d835a3%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/8405A568-7CC9-4917-8BDF-160D999C2D88%40comcast.net.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/F696AC86-FE2F-49E0-A9F2-13E59B651074%40comcast.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to