Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Đồ họa - Thiết kế - Flash
Thiết kế mạng xã hội với PHP - 38
Đang chuẩn bị liên kết để tải về tài liệu:
Thiết kế mạng xã hội với PHP - 38
Quang Sáng
116
10
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
REST bây giờ là một API rất phổ biến kiến trúc, với hầu hết các mạng xã hội cung cấp các API dựa trên REST. Cách RESTful API dựa trên URI mô tả cho việc cung cấp truy cập dữ liệu làm cho họ rất dễ dàng cho người tiêu dùng để sử dụng, như là các URI cung cấp thông tin về những yêu cầu này, và những dữ liệu mà nó sẽ trở lại. Một số triển khai thực hiện, chẳng hạn như các API Twitter thậm chí làm cho nó có thể thay đổi định dạng dữ. | Developing an API Let s go with REST REST is now a very popular API architecture with most social networks providing REST-based APIs. The way RESTful APIs rely on descriptive URIs for providing access to data makes them very easy for consumers to utilize as the URIs provide information on what the request does and what data it will return. Some implementations such as the Twitter API even make it possible to change the format of the data returned simply by changing a part of the URI. Requests Requests to a RESTful API use HTTP verbs to describe what the consumer is trying to do. The API requests are made to specific URIs which define the resource that the consumer is trying to perform the action determined by the verbs upon. HTTP verbs The HTTP verbs and their usage are described as follows Verb Description GET Retrieve information POST Create records PUT Update records DELETE Delete records Resources RESTful APIs relate URIs to resources. Below are some examples http ourdomain.com profiles To list or create profiles http ourdomain.eom profiles 1 A specific user s profile Our RESTful API will be based within an API controller thus prefixing all URLs with api which goes slightly against the REST concept of a resource. 352 Download from Wow eBook www.wowebook.com Chapter 11 Resources and verbs the requests Let s look at how resources and verbs combined result in API requests. API operation HTTP verb Creating a user POST Listing users GET Viewing a user s profile GET Updating a profile PUT Deleting a profile DELETE Resource http ourdomain.com api profiles http ourdomain.com api profiles http ourdomain.eom api profiles 1 http ourdomain.eom api profiles 1 http ourdomain.eom api profiles 1 In the above resources the number 1 represents the ID of a user s profile. Responses The response to an API request is generally made up of two parts. The first part of the response is the HTTP header containing an appropriate status code. Some examples of HTTP status codes are below .
TÀI LIỆU LIÊN QUAN
Thiết kế mạng xã hội với PHP - 37
Thiết kế mạng xã hội với PHP - 38
Thiết kế mạng xã hội với PHP - 39
Thiết kế mạng xã hội với PHP - 40
Thiết kế mạng xã hội với PHP - 41
Thiết kế mạng xã hội với PHP - 42
Thiết kế mạng xã hội với PHP - 43
Thiết kế mạng xã hội với PHP - 44
Thiết kế mạng xã hội với PHP - 45
Thiết kế mạng xã hội với PHP - 46
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.