zoukankan      html  css  js  c++  java
  • curl常用命令备忘

    #####(输出请求头信息) curl -I 
    xxx-Pro:test xxx$ curl -I https://www.baidu.com/   
    HTTP/1.1 200 OK    
    Accept-Ranges: bytes     
    Cache-Control: private, no-cache, no-store, proxy-    revalidate, no-transform    
    Connection: Keep-Alive    
    Content-Length: 277    
    Content-Type: text/html    
    Date: Wed, 24 Apr 2019 09:37:25 GMT    
    Etag: "575e1f6d-115"    
    Last-Modified: Mon, 13 Jun 2016 02:50:21 GMT    
    Pragma: no-cache    
    Server: bfe/1.0.8.18     
    
    #####(需要post的data数据) curl -d     
    curl -d 'name=xxx&passwd=yyy' www.baidu.com     
    
    #####(要输出的文件地址 输出cookie信息) curl -c      
    curl -c cookie -d 'email=xxx&password=yyy' http://api.xxx.cn:8115/api/user/login              
    {"errcode":0,"errmsg":"logout success...","data":    {"username":"xxx","role":"member","uid":    1100,"email":"xxx","add_time":1542010178      
    
    #####(携带cookie进行请求)  curl -b cookie www.baidu.com               
    
    #####(自定义header ) curl -H 'User-Agent: Custom-User-Agent'     
    
    #####(把输出写到该文件)  curl -o    
    
    curl -o ./baidu.html  http://www.baidu.com     
    ls
    baidu.html
    
        
    #####(把输出写到该文件中,保留远程文件的文件名) curl -O https://www.baidu.com/img/baidu_resultlogo@2.png      
    
     
    #####(上传文件)  curl -T xxx.txt -u 用户名:密码 ftp://www.xxxx.com/txt/  
    

      

  • 相关阅读:
    搭建视频网站光线cms
    Linux FTP服务配置
    Chromium下载地址
    Ubuntu Server批量ping选择最快源
    vs2010扩展
    私有云
    mssql格式化输出
    CSLA .NET 3.6支持Silverlight 2
    Unity Application Block 1.2 for Silverlight December 2008
    silverlight寻奇 Graphite
  • 原文地址:https://www.cnblogs.com/leyi/p/10764472.html
Copyright © 2011-2022 走看看