| Customer | |||
| name | Bob Someone | ||
| id | 8402 | ||
| addr | |||
| Street | 555 Witherspoon st. | ||
| city | Anyville | ||
| state | IL | ||
| zip | 60083 | ||
| phone | 555-1212 | ||
If you get the packet for this page by accessing http://localhost:80/FitNesse.UserGuide.RestfulPackets?packet you will get the following JSON packet:
{"tables": [
{"Customer":
{ "addr":
{ "Street": "555 Witherspoon st.",
"city": "Anyville",
"state": "IL",
"zip": "60083"
},
"id": "8402",
"name": "Bob Someone",
"phone": "555-1212"
}
}
]}
JSONP
If you'd like to use JSONP to fetch the packets. (Or any kind of script injection tecnique). You can get fitnesse to return the appropriate format by adding &jsonp=some_function on the end of the url. This will wrap the JSON packet in a function call that looks like this some_function({...}) So, for example, try this link: http://localhost:80/FitNesse.UserGuide.RestfulPackets?packet&jsonp=load_me.Keyboard Shortcuts ?
×