Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fastly/as-compute

Package Overview
Dependencies
Maintainers
47
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastly/as-compute - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "@fastly/as-compute",
"version": "0.1.0",
"version": "0.1.1",
"license": "SEE LICENSE IN LICENSE",

@@ -5,0 +5,0 @@ "main": "assembly/index.ts",

# as-compute
![npm version](https://img.shields.io/npm/v/@fastly/as-fetch) ![npm downloads per month](https://img.shields.io/npm/dm/@fastly/as-fetch)
![npm version](https://img.shields.io/npm/v/@fastly/as-compute) ![npm downloads per month](https://img.shields.io/npm/dm/@fastly/as-compute)

@@ -23,4 +23,5 @@ Experimental AssemblyScript SDK for building [Compute@Edge](https://www.fastly.com/products/edge-compute/serverless) applications with AssemblyScript.

```typescript
// Import `as-fetch` Fetch API classes and Fetchly to interact with Fastly's Compute@Edge.
import { Request, Response, Headers, Fetchly } from "@fastly/as-compute";
// Import the exposed `@fastly/as-fetch`'s Fetch API classes,
// and `Fastly` to interact with Fastly's Compute@Edge.
import { Request, Response, Headers, Fastly } from "@fastly/as-compute";

@@ -37,4 +38,4 @@ // Create some headers for our upstream request to our origin.

// Send the upstream request with `Fetchly.fetch` and wait to get our response.
let upstreamResponse = Fetchly.fetch(upstreamRequest, {
// Send the upstream request with `Fastly.fetch` and wait to get our response.
let upstreamResponse = Fastly.fetch(upstreamRequest, {
backend: "TheOrigin",

@@ -53,3 +54,3 @@ }).wait();

// Send the downstream response back down to the client! :)
Fetchly.respondWith(downstreamResponse);
Fastly.respondWith(downstreamResponse);
```

@@ -56,0 +57,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc