Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sending JSON payload to API in POST body

See original GitHub issue

I have noticed that when I call my endpoints, like so:

import { endpoints } from "wildcard-api/client";

// in some async function
const response = await endpoints.saveNewCronJob({ newCronJob: editingCronJob });

I’m getting a request being sent out that looks like this:


This indicates that the JSON is being serialised and set in the request url as a query string. While this is fine for small payloads, when things get large things might not work out too well (

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

brilloutcommented, Oct 16, 2019

There is nothing to check out 😃 Just update to v0.7.x and leave your code as it is. (Or simply keep v0.5.x.)

brilloutcommented, Jul 21, 2019

(I didn’t forget about this. I’m on vacation. Ttyl.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I post JSON to a REST API endpoint? - ReqBin
To post JSON to a REST API endpoint, you must send an HTTP POST request to the REST API server and provide JSON...
Read more >
How should I pass json data in the request payload of http ...
Most requests the client application (an Electron app) will be sending contains JSON-based bodies, with the only exception being multipart ...
Read more >
JSON Payload for POST Request - R-bloggers
Starting with JSON body because this is the way that most API documentation will give you the payload examples. Send the body as...
Read more >
Add a Request Body to a POST Request | API Connector
Enter a Request Body​​ As part of a POST , PUT , or PATCH request, a data payload can be sent to the...
Read more >
Sending JSON HTTP Request Body in Terminal - Baeldung
HTTP requests for verbs such as POST, PUT, and PATCH optionally sends a request body payload as part of the request.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found