---
title: "Comment by Roy Ibarra on \"Building a Blog Subscription and Pusher with AirCode and Resend\" | Hashnode"
description: "Hey there! After the installation of SWR, you said &quot;Copy the following code in this file:&quot;. Which is the file we need to create or modify? It is not c"
url: "https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610/comment/64ede2b39aae004fb5a8d4a4"
---

[Discussion](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610)

Comment [Building a Blog Subscription and Pusher with AirCode and Resend](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610)

[Roy Ibarra](https://hashnode.com/@rodrigoibarra)

[Aug 29, 2023](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610/comment/64ede2b39aae004fb5a8d4a4)

Hey there! After the installation of SWR, you said "Copy the following code in this file:". Which is the file we need to create or modify? It is not clear 😕. Besides that, thank you for the tutorial and fantastic idea.

[Kevin Wu](https://hashnode.com/@0xinhua)

[Aug 29, 2023](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610/comment/64ede2b39aae004fb5a8d4a4#reply-64ee0f3f9aae004fb5a8db08)

Hi Roy, Kevin Here, copy the SWR request code into src/app/page.tsx file, you can check it out via [github.com/0xinhua/blog-subscription-form/blob/ma…](https://github.com/0xinhua/blog-subscription-form/blob/main/src/app/page.tsx) Thanks for your reminding, I have updated this part.

[Roy Ibarra](https://hashnode.com/@rodrigoibarra)

[Aug 29, 2023](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610/comment/64ede2b39aae004fb5a8d4a4#reply-64ee13bb0f36f04fe5fe3800)

[Kevin Wu](https://hashnode.com/@0xinhua) Thank you! It is very clear now. I'm having a conflict with the params, I'm receiving undefined from the restructuring const { email } = params; Do you have an idea why? Could be related with aircode library?

[Kevin Wu](https://hashnode.com/@0xinhua)

[Aug 29, 2023](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610/comment/64ede2b39aae004fb5a8d4a4#reply-64ee17890f36f04fe5fe3861)

Hey [Roy Ibarra](https://hashnode.com/@rodrigoibarra)

There may be some problems with the Fetch header, try adding Content-Type to your fetch request header in src/app/page.tsx, e.g. 'Content-Type': 'application/json', and try again.

```
  async function sendRequest(url: string, { arg }: { arg: { email: string }}) {
    return fetch(url, {
      headers: {
        'Content-Type': 'application/json'
      },
      method: 'POST',
      body: JSON.stringify(arg)
    }).then(res => res.json())
  }
```

Thank you for your feedback. I will add a headers and update this part code.

[Roy Ibarra](https://hashnode.com/@rodrigoibarra)

[Aug 29, 2023](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610/comment/64ede2b39aae004fb5a8d4a4#reply-64ee3da30f36f04fe5fe3b95)

[Kevin Wu](https://hashnode.com/@0xinhua) it worked! Thank you!
