Skip to Content
Java持续交付
book

Java持续交付

by Daniel Bryant, Abraham Marín-Pérez
November 2019
Beginner to intermediate
406 pages
9h 21m
Chinese
Publishing House of Electronics Industry
Content preview from Java持续交付
106
6
其他构建工具和技巧
出获取
Twitter
首页响应过程中所有的
HTTP
步骤。然后,我们将该命令的输出通过管道
传递给
grep
命令,搜索字符串
HTTP/
示例6-18:使用curlgrep命令来查找访问TwitterHTTP步骤
$ curl -Is https://www.twitter.com -L | grep HTTP/
HTTP/1.1 301 Moved Permanently
HTTP/1.1 200 OK
示例
6-19
中的脚本可以提取出一个短
URL
的真实地址。
示例6-19:展开一个短URL的地址
$ $ curl -sIL buff.ly/2xrgUwi | grep ^Location;
Location: https://skillsmatter.com/
8
skillscasts/10668-looking-forward-to-daniel-bryant-talk?
8
utm_content=buffer887ce&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer
循环
Bash
中使用简单的
for
循环,可以快速重复测试
API
,确认多个请求的结果是否一致,
或者确定
API
调用失败的状态码等,如示例
6-20
所示。
示例6-20:在Bash中通过循环重复向一个URI发起curl请求
#!/bin/bash
for i in `seq 1 10`; do
curl -I http://www.example.com ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

写给系统管理员的Python脚本编程指南

写给系统管理员的Python脚本编程指南

Posts & Telecom Press, Ganesh Sanjiv Naik
Python和NLTK实现自然语言处理

Python和NLTK实现自然语言处理

Posts & Telecom Press, Nitin Hardeniya
解密金融数据

解密金融数据

Justin Pauley
Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu

Publisher Resources

ISBN: 9787121374425