When I use above URL in postman or any tool to post data, I am unable to do so, but when I use below URL I am able to post JSON data.
Do you see any reason why I am unable to post by your URL?
Inputing data into splunk via a RESTful post does not fall within the realm of "normal" activity.
Supported, for sure, but not normal.
See this for more info: http://answers.splunk.com/answers/241698/how-do-i-configure-splunk-for-rest-api-input.html