Return 201 for resource creation.

Also some refacotring on code about responding
Merge pull request #36 from EasonLiao/reply

return 201 instead of 200 for successful resource creation