title: How to set i response status n Sprint cloud function for azurei
body: <p>I am new to Azure Functions, I would like to integrate Spring Cloud Function with Azure Function, I referred many articles but could not get any information regarding how to set HTTP response status and customize content produce from API using Spring cloud.    </p>
  
  <p>I am using the following Maven dependency:</p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
    &lt;artifactId&gt;spring-cloud-function-adapter-azure&lt;/artifactId&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
    &lt;artifactId&gt;spring-cloud-starter-function-web&lt;/artifactId&gt;
    &lt;exclusions&gt;
      &lt;exclusion&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
      &lt;/exclusion&gt;
    &lt;/exclusions&gt;
    &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
    &lt;!--&lt;version&gt;5.0.10.RELEASE&lt;/version&gt;--&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>This is supposed to run on Azure Serverless platform.</p>
  
  <p>1: Spring Function code:</p>
  
  <pre><code>public class AuthorizationFunction implements Function&lt;String,ServicesOut&gt; {
  
      @Autowired
      private someservice;
  
  
      @Override
      public DomainObject apply(String entitlement) {
  
      }
  } 
  </code></pre>
  
  <p>2: Spring Function Handler integrating Azure </p>
  
  <pre><code>public class EntitlementHandler extends AzureSpringBootRequestHandler&lt;String, ServicesOut&gt; {
  
      @FunctionName("functionname")
      public DomainObject execute(@HttpTrigger(name = "request", methods = {HttpMethod.GET}, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage request,
               ExecutionContext context) {
  
       // Depending on Function.apply value set httpresponse status and details
       // set 201 when success
       // set 401 when failure
       // set 500 for other failures
     }
  }
  </code></pre>
  
  <p>Any help will be much appreciated.</p>