PHP Web Services
APIs for the Modern Web
Paperback Engels 2016 2e druk 9781491933091Samenvatting
Whether you’re sharing data between two internal systems or building an API so that users can access their data, this practical guide has everything you need to build APIs with PHP. Author Lorna Jane Mitchell provides lots of hands-on code samples, real-world examples, and advice based on her extensive experience to guide you through the process—from the underlying theory to methods for making your service robust.
You’ll learn how to use this language to work with JSON, XML, and other web service technologies. This updated second edition includes new tools and features that reflect PHP updates and changes on the Web.
- Explore HTTP, from the request/response cycle to its verbs, headers, and cookies
- Work with and publish webhooks—user-defined HTTP callbacks
- Determine whether JSON or XML is the best data format for your application
- Get advice for working with RPC, SOAP, and RESTful services
- Use several tools and techniques for debugging HTTP web services
- Choose the service that works best for your application, and learn how to make it robust
- Document your API—and learn how to design it to handle errors
Specificaties
Lezersrecensies
Inhoudsopgave
1. HTTP
-Clients and Servers
-Making HTTP Requests
2. HTTP Verbs
-Serving GET Requests
-Making GET Requests
-Handling POST Requests
-Making POST Requests
-Using Other HTTP Verbs
3. Headers
-Request and Response Headers
-Identify Clients with User-Agent
-Headers for Content Negotiation
-Securing Requests with the Authorization Header
-Caching Headers
-Custom Headers
4. Cookies
-Cookie Mechanics
-Reading and Writing Cookies
-Making Requests with Cookies
-Cookies and APIs
5. JSON
-When to Choose JSON
-Handling JSON with PHP
-Consuming JSON APIs
6. XML
-XML in PHP
-Consuming XML APIs
7. RPC and SOAP Services
-RPC
-SOAP
8. REST
-RESTful URLs
-Resource Structure and Hypermedia
-Build the Basic RESTful Server
-RESTful Versus Useful
9. Webhooks
-GitHub’s Webhooks
-Publishing Your Own Webhooks
10. HTTP Tools
-Easy Command-Line JSON
-Graphical cURL Alternatives
-Inspect HTTP Traffic with Wireshark
-Tunnel Local Traffic Remotely with ngrok
-Inspect, Edit, Repeat, and Share Requests
-Proxying PHP Applications
-Finding the Tool for the Job
11. Maintainable Web Services
-Sample API Application
-Consistent Output Formats
-Debug Output as a Tool
-Effective Logging Techniques
-Error Handling with PHP Exceptions
12. Making Service Design Decisions
-Service Type Decisions
-How to Present API Data
-Customizable Experiences
-Pick Your Defaults
13. Building a Robust Service
-Consistency Is Key
-Error Handling in APIs
-Meaningful Error Messages
-What to Do When You See Errors
-Making Design Decisions for Robustness
14. Publishing Your API
-Documentation Is Key
-API Description Languages
-Automated Testing Tools
-Tutorials and the Wider Ecosystem
Appendix A: Guide to Common Status Codes
Appendix B: Common HTTP Headers
Index
Anderen die dit boek kochten, kochten ook
Rubrieken
- advisering
- algemeen management
- coaching en trainen
- communicatie en media
- economie
- financieel management
- inkoop en logistiek
- internet en social media
- it-management / ict
- juridisch
- leiderschap
- marketing
- mens en maatschappij
- non-profit
- ondernemen
- organisatiekunde
- personal finance
- personeelsmanagement
- persoonlijke effectiviteit
- projectmanagement
- psychologie
- reclame en verkoop
- strategisch management
- verandermanagement
- werk en loopbaan