你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

HttpOutput 接口

public interface HttpOutput

将其放在参数上,其值将作为 HTTP 响应发送回给用户。 参数类型应为 OutputBinding<T>,其中 T 可以是以下类型之一:

    <li>
    
      <p>
    
        <xref uid="com.microsoft.azure.functions.HttpResponseMessage" data-throw-if-not-resolved="false" data-raw-source="HttpResponseMessage"></xref>
    
      </p>
    
    </li>
    
    <li>
    
      <p>Any native Java types such as int, String, byte[] </p>
    
    </li>
    
    <li>
    
      <p>Any POJO type </p>
    
    </li>
    

方法摘要

修饰符和类型 方法和描述
String dataType()

定义 Functions 运行时应如何处理参数值。 可能的值为:

    <li>
    
      <p>"" or string: treat it as a string whose value is serialized from the parameter </p>
    
    </li>
    
    <li>
    
      <p>binary: treat it as a binary data whose value comes from for example OutputBinding&lt;byte[]&gt; </p>
    
    </li>
    

String name()

function.json 中使用的变量名称。

方法详细信息

dataType

public String dataType() default ""

定义 Functions 运行时应如何处理参数值。 可能的值为:

    <li>
    
      <p>"" or string: treat it as a string whose value is serialized from the parameter </p>
    
    </li>
    
    <li>
    
      <p>binary: treat it as a binary data whose value comes from for example OutputBinding&lt;byte[]&gt; </p>
    
    </li>
    

返回:

将由 Functions 运行时使用的 dataType。

name

public String name()

function.json 中使用的变量名称。

返回:

function.json 中使用的变量名称。

适用于