Designing Evolvable Web APIs with ASP.NET (2014).pdf

(16138 KB) Pobierz
Designing Evolvable Web APIs
with ASP.NET
Glenn Block, Pablo Cibraro, Pedro Felix,
Howard Dierking, and Darrel Miller
Designing Evolvable Web APIs with ASP.NET
by Glenn Block, Pablo Cibraro, Pedro Felix, Howard Dierking, and Darrel Miller
Copyright © 2014 Glenn Block, Pablo Cibraro, Pedro Felix, Howard Dierking, and Darrel Miller. All rights
reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/
institutional sales department: 800-998-9938 or
corporate@oreilly.com.
Editors:
Rachel Roumeliotis and Amy Jollymore
Production Editor:
Nicole Shelby
Copyeditor:
Rachel Monaghan
Proofreader:
Rachel Head
March 2014:
First Edition
Indexer:
Judy McConville
Cover Designer:
Randy Comer
Interior Designer:
David Futato
Illustrator:
Kara Ebrahim
Revision History for the First Edition:
2014-03-11:
First release
See
http://oreilly.com/catalog/errata.csp?isbn=9781449337711
for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly
Media, Inc.
Designing Evolvable Web APIs with ASP.NET,
the images of warty newts, and related trade dress
are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark
claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information contained
herein.
ISBN: 978-1-449-33771-1
[LSI]
Table of Contents
Foreword. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
1. The Internet, the World Wide Web, and HTTP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Web Architecture
Resource
URI
Cool URIs
Representation
Media Type
HTTP
Moving Beyond HTTP 1.1
HTTP Message Exchange
Intermediaries
Types of Intermediaries
HTTP Methods
Headers
HTTP Status Codes
Content Negotiation
Caching
Authentication
Authentication Schemes
Additional Authentication Schemes
Conclusion
What Is a Web API?
What About SOAP Web Services?
Origins of Web APIs
2
3
4
5
5
5
8
8
8
10
11
12
15
16
17
17
20
21
22
22
23
23
24
2. Web APIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
iii
Zgłoś jeśli naruszono regulamin