zoukankan      html  css  js  c++  java
  • curl传输文件实例

    curl -H "Authorization:Bearer 5d719398-4230-44c7-b88b-f280b6a8d070" -H "Accept: application/json" -H "Content-Type: multipart/mixed" -F "metadata=@test.json; name=story; type=application/json; charset=UTF-8 "  -X POST http://mypath/postpath -i -v


    curl -H "Authorization:Bearer 5d719398-4230-44c7-b88b-f280b6a8d070" -H "Accept: application/json" -H "Content-Type: multipart/mixed" -F "name=story; metadata=@test.json; type=application/json; charset=UTF-8 "  -X POST http://mypath/postpath -i -v

    only json
    curl -H "Authorization:Bearer f19fd8c5-d64b-4ed5-bf09-556684fcc235" -H "Accept: application/json" -H "Content-Type: multipart/mixed" -F "story=@story_t1.json; type=application/json;charset=UTF-8 "  -X POST http://mypath/postpath -i -v
    ok

    curl  -H "Accept: application/json" -H "Content-Type: multipart/mixed" -F "story=@story_t1.json; type=application/json;charset=UTF-8 "  -X POST http://mypath/postpath -i -v
    ok



    test jpg
    curl -H "Authorization:Bearer 5d719398-4230-44c7-b88b-f280b6a8d070" -H "Accept: application/json" -H "Content-Type: multipart/mixed" -F "story=@story_jpg.json; type=application/json;charset=UTF-8 " -F "files=@att1.jpg; type=image/jpg"  -X POST http://mypath/postpath -i -v
    ok
    test 2 jpgs
    curl -H "Authorization:Bearer 5d719398-4230-44c7-b88b-f280b6a8d070" -H "Accept: application/json" -H "Content-Type: multipart/mixed" -F "story=@story_2jpg.json; type=application/json;charset=UTF-8 " -F "files=@att1.jpg; type=image/jpg" -F "files=@att2.jpg; type=image/jpg" -X POST http://mypath/postpath -i -v
    ok


    curl  -H "Accept: application/json" -H "Content-Type: multipart/mixed" -F "story=@story_t1.json; type=application/json;charset=UTF-8 "  -X POST http://mypath/postpath -i -v




    curl  -H "Accept: application/json" -H "Content-Type: multipart/mixed" -F "story=@story_500.json; type=application/json;charset=UTF-8 "  -X POST http://mypath/postpath -i -v


    curl -H "Authorization:Bearer 5d719398-4230-44c7-b88b-f280b6a8d070" -H "Accept: application/json" -H "Content-Type: multipart/mixed" -F "story=@story_jpg.json; type=application/json;charset=UTF-8 "   -X POST http://mypath/postpath -i -v




    curl -H "Authorization:Bearer 5d719398-4230-44c7-b88b-f280b6a8d070" -H "Accept: application/json" -H "Content-Type: multipart/mixed" -F "story=@story_jpg2.json; type=application/json;charset=UTF-8 " -F "files=@att1.jpg; type=image/jpg"  -X POST http://mypath/postpath -i -v


    curl -H 'Content-Type:text/plain' --data-binary @urls.txt "http://www.xxx.com/urls"

  • 相关阅读:
    Silverlight 2中实现文件上传和电子邮件发送
    Silverlight结合Web Service进行文件上传
    silverlight DataGrid 内嵌ComboBox 实现加载和保存
    silverlight 使用IValueConverter 转换
    检测场所条件查询
    代码中的坏味道
    Prism初研究之Bootstrapper
    Prism初研究之简介
    编写可读代码的艺术
    ffmpeg怎么样处理网络流
  • 原文地址:https://www.cnblogs.com/zhao1949/p/7194783.html
Copyright © 2011-2022 走看看