Here is the json data
     { 
         "title": "The Title", 
         "content": "The Content" 
     }  
    curl -vX POST http://localhost:10003/sample -H "Content-Type:application/json" \ -d '{ "title": "The Title", "content": "The Content" }'
    -export([content_types_accepted/2]).
    allowed_methods(Req, State) ->  
        {[<<"GET">>, <<"POST">>], Req, State}.  
    content_types_accepted(Req, State) ->
    {[{{<<"application">>, <<"json">>, []}, welcome}], Req, State}.
    welcome(Req, State) ->
        Req_method = cowboy_req:method(Req),
        io:format("Req_method is ~p ~n", [Req_method]),
        Req_Body = cowboy_req:body(Req),
        io:format("Body is ~p ~n", [Req_Body]),
        Body = <<"<h1>This is a response for other methods</h1>">>,
        io:format("Body is  ~p ~n",[Body]),
        {Body, Req, State}.
I see Method and Body but trying to catch json data unable to do such.