anchor.diff:  content_types_provided(ReqData, State) ->
   		{[{"application/json", get_datapoint}], ReqData, State}.
   
  -
  -%% @doc
  -%% Function: content_types_accepted/2
  -%% Purpose: based on the content-type on a 'POST' or 'PUT', we know which kind of data that is allowed to be sent to the server.
  -%% A code 406 is returned to the client if we don't accept a media type that the client has sent.
  -%% Returns: {[{Mediatype, Handler}], ReqData, State}
  -%% @end
  --spec content_types_accepted(ReqData::tuple(), State::string()) -> {list(), tuple(), string()}.
  -content_types_accepted(ReqData, State) ->
  -		{[{"application/json", put_datapoint}], ReqData, State}.
   
   
   %% @doc
  
positive.code: process_post(ReqData, State) ->
  	erlang:display("posted"),
  			{DatapointJson,_,_} = json_handler(ReqData, State),
  			case erlastic_search:index_doc(?INDEX, "datapoint", DatapointJson) of
  				{error, Reason} -> {{error, Reason}, ReqData, State};
  				{ok,_} -> {true, ReqData, State}
  			end.
  
  
  %% @doc
  
negative.code: 		[{"streams", _Id}, {"data", "_search"}] ->
  			{['POST','GET'], ReqData, State};
  		[{"streams", _Id}, {"data"}] ->
  			{['GET', 'POST', 'DELETE'], ReqData, State};
  		[error] ->
  			{['POST','GET'], ReqData, State}
  	end.
  