Cisco Cisco Prime Home 5.2 Developer's Guide

Page of 78
Cisco Prime Home – Integration Guide
 
 
OL-28558-01   v5.1
 
11 
Content-Type: application/json  
This header informs the server that the body of the request is formatted as 
JSON and should be interpreted as such.  
Body
 
The headers and body are separated by a single empty line. A representation of 
the resource being sent to the server is contained within the body. Its format is 
dictated by the value of the 
Content-Type
 header.  
Response
 
HTTP/1.1 200 OK 
Content-Type: application/json 
Content-Length: 34 

name: "Bob Jones",  
age: 30 
 
The response says: "Your request was successful and here is your result in JSON 
format." An HTTP response is ALWAYS in the form:  
[http version] [status number] [status text] 
[headers]  
[\n]  
[body]  
HTTP/1.1 200 OK  
This line indicates that the response uses the HTTP 1.1 protocol, and that the 
request was successful. 
Headers  
Content-Type: application/json
  
The body of the response contains a JSON formatted representation of resource.  
 
Content-Length: 34  
There are 34 bytes in the body 
Body  
The headers and body are separated by a single empty line. A representation of 
the resource being sent from the server is contained within the body. Its format 
is dictated by the value of the Content-Type header.  
 
Methods  
Method 
Purpose 
GET 
retrieves a representation of the resource 
DELETE 
removes a resource at the URI 
POST 
 
update a resource by appending to it, or by providing partial state 
which is filled in by an internal process 
PUT 
create or replace a resource at the URI 
References
 
•