惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Exploit Database - CXSecurity.com
J
Java Code Geeks
H
Help Net Security
B
Blog RSS Feed
G
Google Developers Blog
博客园 - 司徒正美
MongoDB | Blog
MongoDB | Blog
量子位
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
P
Proofpoint News Feed
小众软件
小众软件
人人都是产品经理
人人都是产品经理
云风的 BLOG
云风的 BLOG
V
V2EX
月光博客
月光博客
C
Check Point Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
A
Arctic Wolf
Help Net Security
Help Net Security
Schneier on Security
Schneier on Security
D
DataBreaches.Net
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Palo Alto Networks Blog
T
Tenable Blog
L
LangChain Blog
Attack and Defense Labs
Attack and Defense Labs
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
Forbes - Security
Forbes - Security
F
Fortinet All Blogs
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
大猫的无限游戏
大猫的无限游戏
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Y
Y Combinator Blog
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Engineering at Meta
Engineering at Meta
NISL@THU
NISL@THU
GbyAI
GbyAI
博客园 - Franky
S
Secure Thoughts
有赞技术团队
有赞技术团队
PCI Perspectives
PCI Perspectives
U
Unit 42

Vercel News

Vercel Open Source Program: Winter 2026 cohort How Notion Workers run untrusted code at scale with Vercel Sandbox How we run Vercel's CDN in front of Discourse From idea to secure checkout in minutes with Stripe Building Slack agents can be easy Scaling redirects to infinity on Vercel Advancing Python typing Gamma builds design-first agents with Vercel How Avalara turns pipe dreams into patent-pending with v0 Keeping community human while scaling with agents How OpenEvidence built a healthcare AI that physicians actually trust Security boundaries in agentic architectures Skills Night: 69,000+ ways agents are getting smarter Video Generation with AI Gateway We Ralph Wiggumed WebStreams to make them 10x faster How Stably ships AI testing agents in hours, not weeks How we built AEO tracking for coding agents Anyone can build agents, but it takes a platform to run them Introducing Geist Pixel The Vercel AI Accelerator is back with $6m in credits Making agent-friendly pages with content negotiation The Vercel OSS Bug Bounty program is now available Introducing the new v0 Run untrusted code with Vercel Sandbox, now generally available How Stripe built a game-changing app in a single flight with v0 How Sensay went from zero to product in six weeks AGENTS.md outperforms skills in our agent evals Agent skills explained: An FAQ Testing if "bash is all you need" AWS databases are now live on the Vercel Marketplace and v0 Use Perplexity Web Search with Vercel AI Gateway Introducing: React Best Practices Nick Bogaty joins Vercel as Chief Revenue Officer How Mux shipped durable video workflows with their @mux/ai SDK How to build agents with filesystems and bash How we made v0 an effective coding agent Stopping the slow death of internal tools Building AI-Generated Pixel Trading Cards with Vercel AI Gateway We removed 80% of our agent’s tools AI SDK 6 Our $1 million hacker challenge for React2Shell Cline now runs on Vercel AI Gateway How to prompt v0 Build smarter workflows with Notion and v0 Vercel launches partner certification Inside Workflow DevKit: How framework integrations work React2Shell Security Bulletin | Vercel Knowledge Base Billions of requests: Black Friday-Cyber Monday 2025 Investing in the Python ecosystem AWS Databases coming to the Vercel Marketplace How we built the v0 iOS app Workflow Builder: Build your own workflow automation platform Vercel Open Source Program: Fall 2025 cohort Self-driving infrastructure Vercel collaborates with Google for Gemini 3 Pro Preview launch Vercel: The anti-vendor-lock-in cloud How Nous Research used BotID to block automated abuse at scale How AI Gateway runs on Fluid compute What we learned building agents at Vercel Build and deploy data applications on Snowflake with v0 BotID Deep Analysis catches a sophisticated bot network in real-time Vercel achieves TISAX AL2 compliance to serve automotive partners Bun runtime on Vercel Functions David Totten Joins Vercel to Lead Global Field Engineering Vercel Ship AI 2025 recap You can just ship agents AI agents and services on the Vercel Marketplace Built-in durability: Introducing Workflow Development Kit Zero-config backends on Vercel AI Cloud Introducing Vercel Agent: Your new Vercel teammate Update regarding Vercel service disruption on October 20, 2025 Agents at work, a partnership with Salesforce and Slack Running Next.js in ChatGPT: How to Build ChatGPT Apps Talha Tariq joins Vercel as CTO of Security Just another (Black) Friday Server rendering benchmarks: Fluid Compute and Cloudflare Workers Towards the AI Cloud: Our Series F Collaborating with Anthropic on Claude Sonnet 4.5 to power intelligent coding agents Preventing the stampede: Request collapsing in the Vercel CDN BotID uncovers hidden SEO poisoning How we made global routing faster with Bloom filters What you need to know about vibe coding Scale to one: How Fluid solves cold starts Addressing security & quality issues with MCP tools - Vercel AI agents at scale: Rox’s Vercel-powered revenue operating system Agentic Infrastructure Zero Data Retention on AI Gateway Optimizing Vercel Sandbox snapshots How Waldium made a blog platform work for humans and AI alike How FLORA shipped a creative agent on Vercel's AI stack Agent responsibly Making Turborepo 96% faster with agents, sandboxes, and humans Unified reporting for all AI Gateway usage new.website joins forces with v0 SERHANT.'s playbook for rapid AI iteration Two startups at global scale without DevOps Chat SDK brings agents to your users 360 billion tokens, 3 million customers, 6 engineers Meet the 2026 Vercel AI Accelerator Cohort Build knowledge agents without embeddings
Helpers for Serverless Node.js Functions - Vercel – Vercel
2019-06-19 · via Vercel News

3 min read

Migrating to serverless Node.js functions or creating new ones can mean that some of the tools and frameworks you used previously are not suitable anymore.

With today's feature release, we want to solve this problem by providing you with a set of default helpers exposed within your Node.js function.

Link to headingWhat's New

The recent update to serverless Node.js functions on Vercel introduces six default methods to the request and response payload:

  • request.query

  • request.cookies

  • request.body

  • response.status()

  • response.json()

  • response.send()

In order to access any of these methods, no changes are required on your side.

Link to headingPerformance

With the introduction of helpers, your application receives a gain in performance when compared to a basic Express.js application:

NOTE: The benchmarks above are used to showcase the performance difference between serverless Node.js functions on Vercel and the Express.js framework.

While the relative improvement will stay the same, the actual time taken will vary depending on your system configuration.

Link to headingHow to Use Helpers

These are the properties and methods that are available on the request and response arguments that your serverless function receives:

Link to headingrequest.query

Before this update, the easiest way to parse the GET parameters of an incoming GET request was to retrieve the request.url property and then pass the value to a parser.

With request.query, however, you have direct access to all the GET parameters, without having to parse them on your own:

module.exports = (request, response) => {

console.log(request.query);

};

For example, if your endpoint's URL is /endpoint?key=value, the content of request.query would look like this:

{ "key": "value" }

Link to headingrequest.cookies

In order to access the cookies supplied by an incoming request, you previously had to retrieve the Set-Cookie header from the request and then parse it manually.

With request.cookies, you only need to invoke a property:

module.exports = (request, response) => {

console.log(request.cookies);

};

Doing so will give you all the cookies in a single object:

{

"cookie1": "i am a cookie",

"cookie2": "i am yet another cookie"

}

Link to headingrequest.body

As the most versatile property out of all mentioned above, request.body allows you to easily access the body of incoming requests, no matter what format:

module.exports = (request, response) => {

console.log(request.body);

};

Naturally, the body for incoming requests to serverless functions can be either:

  • A string of text (text/plain)

  • A buffer (application/octet-stream)

  • A json object (application/json)

  • A form data query string (application/x-www-form-urlencoded)

No matter which of those formats you are using for your body, accessing request.body will automatically parse it and return it.

For example, this is what the body would look like for a JSON request:

{

"firstKey": "example value",

"secondKey": "another example value"

}

Link to headingresponse.status()

This method for outgoing responses can be invoked before response.send() and response.json() in order to define a status code for the response.

If you were to return an access error, for example, you could do it like this:

module.exports = (request, response) => {

response.status(403);

response.json({ error: 'You do not have access' });

};

Link to headingresponse.json()

As you can see in the example above, the response.json() method can be invoked with a JSON object as the first (and only) argument. It will then stringify the JSON it receives and send it back to the client:

module.exports = (request, response) => {

response.json({ property: 'value' });

};

When invoked, the method will automatically set the Content-Type header of the outgoing response to application/json, in order for the client to understand that JSON was sent.

Link to headingresponse.send()

This method – just like response.json() – allows you to define the body of the outgoing response. However, it is used for sending plain text or buffers:

module.exports = (request, response) => {

const example = Buffer.from('Welcome!');

response.send(example);

};

Link to headingConclusion

Assuming you are using the latest version of Vercel, there is no action to be taken: Edit one of your serverless Node.js functions and start using the helpers.

In the future, the list of helpers will grow. So stay tuned!

We also recommend checking out:

Should you encounter any problems with the current helpers, please let us know or join the Vercel Community to find answers to your questions.