Sending data to backend from app extension

Topic summary

A developer is encountering an issue where data sent from a browser extension form to a Shopify app backend via fetch() POST request arrives as null in the request body.

Technical Setup:

  • Extension uses FormData to collect customer information (name, address, phone number)
  • POST request targets /apps/proxy endpoint
  • Backend attempts to authenticate and process the incoming request

Current Problem:

  • The request body appears null on the backend despite FormData being populated on the frontend
  • Code snippets show both extension and app proxy implementation, though portions appear corrupted or reversed in the original post

Status: The issue remains unresolved with no responses or solutions provided yet. This appears to be a common data transmission problem between extension and backend, potentially related to CORS, content-type headers, or how FormData is being parsed on the server side.

Summarized with AI on November 10. AI used: claude-sonnet-4-5-20250929.

i am trying to send data from a form on extension to backend fetch body but body is showing null

EXTENSION

let formData = new FormData()
formData.append(“customerName”, customerName)
formData.append(“customerAddress”, customerAddress)
formData.append(“customerNumber”, phoneNumber)
await fetch([https://my-app.myshopify.com/apps/proxy](https://my-app.myshopify.com/apps/proxy), {
method: “POST”,
redirect: “manual”,
body: formData,
}).then((response)=> console.log('hello respose ',response))
.then((data)=>console.log(‘data’,data))
.catch(error => console.log("ERRORRR: ",error))

APP PROXY

export async function action ({request}){
console.log(“----->hit app proxy----->”)
const {session} = await authenticate.public.appProxy(request)
if(session){
console.log(session)
console.log(request)
}

return null
}