I want to use some REST APIs but I don't understand what need to be done to be able to change the HTTP status of a post service.

I actually have :

interface MyAPI
{
	void	postNewsletter(string email);
}

class MyAPIImplementation : MyAPI
{
	void	postNewsletter(string email)
	{
		registerToNewsletter(email);
	}
}

How I can manipulate the HTTPServerResponse will be sent to the client for the postNewsletter method?