zoukankan      html  css  js  c++  java
  • Getting Started with Windows Live Contacts API

    http://msdn.microsoft.com/en-us/library/bb463982.aspx

    The Windows Live Contacts API defines a set of Web services that enables customers to programmatically access the Windows Live Contacts Address Book database.

    The Windows Live Contacts Web service is exposed to clients in a HTTP/GET request interface with XML response.

    This API is intended for customers and partners who want to take advantage of the Address Book service known as Windows Live Contacts. An example of an application that may be built on this API is described in About the Windows Live Contacts API.

    Using REST with the Windows Live Contacts API

    To use the Windows Live Contacts API, an application must use the Representational State Transfer (REST) protocol to send requests to Windows Live Contacts and receive responses in reply.

    REST is an HTTP-based protocol for remote data operations, for example from a client application to a Web service. With REST, the object and the verb are separated because a fixed set of verbs exist. You supply the path of the object within the schema on which you want the action to take place.

    The HTTP methods that the Windows Live Contacts REST implementation supports are based on the definitions in RFC 2616.

    Method Usage

    GET

    Retrieves whatever information is identified by the request Universal Resource Identifier (URI). When a GET request succeeds, the response contains the data that is requested. For more information, see Windows Live Contacts API Methods: GET.

    POST

    Inserts the data that is enclosed in the request body as a child of the element or elements identified by the request URI. When a POST request succeeds, the response code is the "201 Created" status code, and the response contains a Location header that points to the newly-created object or objects. For more information, seeWindows Live Contacts API Methods: POST.

    When a caller uses the POST method, the caller inserts data under the parent that the request URI identifies.

    Multiple child objects can be created by using a single POST request.

    PUT

    Updates the object that is identified by the request URI with the data that is supplied in the request body. When a PUT request succeeds, the response code is the "204 No Content" status code, and no content is returned. For more information, see Windows Live Contacts API Methods: PUT.

    DELETE

    Removes the data object that is identified by the request URI. When a DELETE request succeeds, the response code is the "204 No Content" status code, and no content is returned. For more information, see Windows Live Contacts API Methods: DELETE.

    The request URI identifies the object or the class to be manipulated by the method. Additionally, the request URI effectively describes the path through the data hierarchy to the object or objects. An example request URI might be:

    /LiveContacts/Contacts/Contact(ContactID)/Locations/Location(LocationID)/CompanyName

    This request URI identifies a specific Contact container by ID (ContactID) and, within that contact, a specific location class by ID (LocationID), which could refer to any Location container. Then, the request URI identifies the actual property. In this example the actual property is the CompanyName element.

    With this URI format and a chosen method, you can identify and act on any piece of data in Windows Live Contacts by using a single HTTP call.

  • 相关阅读:
    Android 5.0以下系统支持TLS 1.1/1.2协议版本
    Java & Android未捕获异常处理机制
    Oppo Reno2 不允许安装非正式签名应用
    Android ADB 实用总结
    Android Studio中的非项目文件及项目目录下的全局搜索
    Android开发中网络代理设置实用总结
    基于时间偏差思路下的时间周期度量
    nodejs anywhere 搭建本地静态文件服务
    Android 支持库迁移到AndroidX
    项目Gradle版本从4.4升级到4.6
  • 原文地址:https://www.cnblogs.com/chenxizhang/p/1661629.html
Copyright © 2011-2022 走看看