curl command

when you use curl command, you want to post your several parameters to server, you must use several "-F" (Mr.cai told me); If you try to use one "-F", error will be appear. man curl to get more info.

exp:

  error:

curl --proxy www-proxy.ao.ericsson.se:8080 -v --trace test.log -F "Filedata=@/home/kaka/test.mp4;username=ericssontest;password=123456;partnerid=XMTI3Ng==;title=test;memo=test;tags=test;catIds=106;sourceType=1;publicType=0" http://gupload.youku.com/upload/uploadPackage  (In this condition, the resolver can only recognize the first parameter 'Filedata=@/home/kaka/test.mp4', so the response from server is wrong!)

  correct:

curl --proxy www-proxy.ao.ericsson.se:8080 -v --trace test.log -F Filedata=@/home/kaka/test.mp4 -F username=ericssontest -F password=123456 -F partnerid=XMTI3Ng== -F title=test -F memo=test -F tags=test -F catIds=106 -F sourceType=1 -F publicType=0 http://gupload.youku.com/upload/uploadPackage 

Once this command is executed (the network must be connected first, proxy is selectable,alternative), the response from server will be storaged into log information file "test.log"

posted on 2012-07-07 12:31  NLP-Kevin  阅读(370)  评论(0)    收藏  举报