Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 739 Bytes

File metadata and controls

34 lines (22 loc) · 739 Bytes

HTTP & Networking

Perry natively implements HTTP servers, clients, and WebSocket support.

Fastify Server

{{#include ../../examples/stdlib/http/snippets.ts:fastify-server}}

Perry's Fastify implementation is API-compatible with the npm package. Routes, request/reply objects, params, query strings, and JSON body parsing all work.

Fetch API

{{#include ../../examples/stdlib/http/snippets.ts:fetch-api}}

Axios

{{#include ../../examples/stdlib/http/snippets.ts:axios-client}}

WebSocket

{{#include ../../examples/stdlib/http/snippets.ts:websocket-client}}

Next Steps