hi guys i below is what i receive from a curl response.
HTTP/1.1 200 OK
X-Account-Object-Count: 4
X-Account-Bytes-Used: 3072798
X-Account-Container-Count: 3
Accept-Ranges: bytes
Content-Length: 15
Content-Type: text/plain; charset=utf-8
Date: Thu, 12 Jan 2012 04:07:33 GMT
a1
abc
testing
i found a good function which parses the headers and i can grab the key value pairs in headers not a problem the problem i have is how to grab the names in the body
a1
abc
testing
i think may be regex can do the best job but do not know if regex is the best approach or is there any other function which can return headers separete and body separate.
Any help is appreciated. thanks.
Updates
Now i am getting the response as
HTTP/1.1 200 OK
X-Account-Object-Count: 4
X-Account-Bytes-Used: 3072798
X-Account-Container-Count: 3
Accept-Ranges: bytes
Content-Length: 115
Content-Type: application/json; charset=utf-8
Date: Thu, 12 Jan 2012 04:47:36 GMT
[{"name":"a1","count":0,"bytes":0},{"name":"abc","count":0,"bytes":0},{"name":"testing","count":4,"bytes":3072798}]
so the names are in json
Seems like it should be as simple as: