forked from docs/doc-exports
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com> Co-authored-by: Chen, Junjie <chenjunjie@huawei.com> Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
22 lines
4.2 KiB
HTML
22 lines
4.2 KiB
HTML
<a name="functiongraph_02_1002"></a><a name="functiongraph_02_1002"></a>
|
|
|
|
<h1 class="topictitle1">HTTP Functions</h1>
|
|
<div id="body32001227"><div class="section" id="functiongraph_02_1002__en-us_topic_0000001257403573_section158381422174817"><h4 class="sectiontitle">Overview</h4><p id="functiongraph_02_1002__en-us_topic_0000001257403573_p08911948164815">FunctionGraph supports event functions and HTTP functions. HTTP functions are designed to optimize web services. You can send HTTP requests to URLs to trigger function execution. HTTP functions support APIG triggers only.</p>
|
|
<div class="note" id="functiongraph_02_1002__en-us_topic_0000001257403573_note20199249161019"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ol id="functiongraph_02_1002__en-us_topic_0000001257403573_ol112413435152"><li id="functiongraph_02_1002__en-us_topic_0000001257403573_li1645355615">HTTP functions support the HTTP/1.1 protocol.</li><li id="functiongraph_02_1002__en-us_topic_0000001257403573_li17241443161510">On the function creation page, <strong id="functiongraph_02_1002__en-us_topic_0000001257403573_b12403205914467">HTTP Function</strong> is newly added.</li><li id="functiongraph_02_1002__en-us_topic_0000001257403573_li17454474166">The HTTP function must be set to bootstrap. You can directly write the startup command and <strong id="functiongraph_02_1002__en-us_topic_0000001257403573_b1796620466411">allow access over port 8000</strong>.</li></ol>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="functiongraph_02_1002__en-us_topic_0000001257403573_section51075716490"><h4 class="sectiontitle">Advantages</h4><ul id="functiongraph_02_1002__en-us_topic_0000001257403573_ul1357413985818"><li id="functiongraph_02_1002__en-us_topic_0000001257403573_li135744955818">Support for multiple frameworks<p id="functiongraph_02_1002__en-us_topic_0000001257403573_p65361612903"><a name="functiongraph_02_1002__en-us_topic_0000001257403573_li135744955818"></a><a name="en-us_topic_0000001257403573_li135744955818"></a>You can use common web frameworks, such as Node.js Express and Koa, to write web functions, and migrate your local web framework services to the cloud with least modifications.</p>
|
|
</li><li id="functiongraph_02_1002__en-us_topic_0000001257403573_li133174818589">Fewer request processing steps<p id="functiongraph_02_1002__en-us_topic_0000001257403573_p1590219159020"><a name="functiongraph_02_1002__en-us_topic_0000001257403573_li133174818589"></a><a name="en-us_topic_0000001257403573_li133174818589"></a>Functions can directly receive and process HTTP requests, eliminating the need for API Gateway to convert the JSON format. This accelerates request processing and improves web service performance.</p>
|
|
</li><li id="functiongraph_02_1002__en-us_topic_0000001257403573_li255216244596">Premium writing experience<p id="functiongraph_02_1002__en-us_topic_0000001257403573_p211442911015"><a name="functiongraph_02_1002__en-us_topic_0000001257403573_li255216244596"></a><a name="en-us_topic_0000001257403573_li255216244596"></a>Writing HTTP functions is similar to writing native web services. You can also use native Node.js APIs to enjoy local development-like experience.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="functiongraph_02_1002__en-us_topic_0000001257403573_section14204102684913"><h4 class="sectiontitle">Restrictions</h4><ul id="functiongraph_02_1002__en-us_topic_0000001257403573_ul1863910297493"><li id="functiongraph_02_1002__en-us_topic_0000001257403573_li10639929174918">HTTP functions support APIG (dedicated) triggers only.</li><li id="functiongraph_02_1002__en-us_topic_0000001257403573_li46391829184910">Multiple API triggers can be bound to the same function, but all the APIs must belong to the same APIG service.</li><li id="functiongraph_02_1002__en-us_topic_0000001257403573_li19639112917493">For HTTP functions, the size of the HTTP response body cannot exceed 6 MB.</li><li id="functiongraph_02_1002__en-us_topic_0000001257403573_li517810213199">HTTP functions cannot be executed for a long time, invoked asynchronously, or retried.</li></ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="functiongraph_02_1000.html">Function Types</a></div>
|
|
</div>
|
|
</div>
|
|
|