HonoH
Hono16mo ago
Nicolas

Weird bug: JSON data not making it to server: RPC

Hi all,

I am sending some data to my Hono server like so:
const places = await api.map.getPlaces.$post({
              json: {
                textQuery: "machine shop sheetmetal fabrication....",
                lat: circle.snapshot.center.lat,
                lng: circle.snapshot.center.lng,
                radius: circle.snapshot.radius,                
              },
            });

And getting the data on my server like so:
.post(
  "/getPlaces",
  zValidator("json", searchPlacesInput),
  async (c) => {    
    const data = c.req.valid("json");


But apparently I am getting
undefined
for all the data, attached are screenshots of my network requests. Clearly it is getting data...., so i am not sure what to do or how to troubleshoot this.

My intellisense is working fine and autocomplete works.

Thanks!
image.png
image.png
Was this page helpful?