Nov 25, 2013

CURL: Post request with payload/content body

Curl Command with a JSON Data
curl --header "Content-Type: application/json" -X POST -d '{"state": "----X----"}' http://localhost:8888/_ah/api/tictactoe/v1/board

Curl Command with POST Parameter
curl  -X POST -d 'key1=value1&key2=value2&' http://localhost:8888/_ah/api/tictactoe/v1/board







Curl Command with GET Parameter
curl  -X GET -d 'key1=value1&key2=value2&' http://localhost:8888/_ah/api/tictactoe/v1/board


This sample command get from tictactoe

Nov 19, 2013

Magento: How to override the home url.

The Goal here is, instead of modifying the CMS(in admin) for the home data. You can better create a custom module to handle this one. At this place you have control to the controller, block and template. Unlike when you use the CMS to update you home, you can only controller the block and template with the sample tag below
{{ block="module/block" template="module/block.phtml"}}
BTW, to do the use the custom module as your home goto System -> Configuration -> Web -> Default Pages -> Default Web URL






But if you want to, just to change the home page, you can try this System -> Configuration -> Web -> Default Pages
Change the value of

Default Web URL " cms
CMS Home Page :  Choose the available pages in the drop down