> ## Documentation Index
> Fetch the complete documentation index at: https://bunnynet-cb9733c2-add-new-partner-apis.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Return JSON

> Respond with JSON, for an API endpoint or for configuration data.

This script returns a fixed JSON object with the right `content-type` header.

```ts theme={null}
import * as BunnySDK from "@bunny.net/edgescript-sdk";

BunnySDK.net.http.serve(
  async (request: Request): Response | Promise<Response> => {
    const data = {
      weather: "sunny",
      temperature: 27,
      windspeed: 0,
      uvindex: 7,
    };

    const json = JSON.stringify(data);

    return new Response(json, {
      headers: {
        "content-type": "application/json",
      },
    });
  },
);
```
