question-mark
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.

Impossible to pass JSON data in a customPOST request?

See original GitHub issue

Also I believe the documentation of customPOST’s parameters is wrong.

When I do this:

Restangular.one('users', 'alex').customPOST(1, 2, {a: 3}, 4)

I get a POST request to this URL: https://local.talkspot.org/api/users/alex/1

1 (according to the documentation) should be the element, not the path, hence I believe the documentation is not correct. Also {a: 3} turned into a request header, rather than params as stated in the documentation, so that further strengthens my belief that the documentation is not good.

Finally, How do I pass my custom JSON in this customPOST? I don’t see this option anywhere. There should be a place, shouldn’t there?

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
chauhan216commented, Jan 21, 2016

Still facing the same issue in v1.5.1, I passed the json in first argument but not sent in the request , req.body is empty.

0reactions
mgontocommented, Nov 11, 2013

That’s awesome! I’m going to change default names, some of them suck 😄 but at least you can configure them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't sent json data to server with POST request
I am trying to send json data to server ...
Read more >
Error creating JSON data source with "POST Body" parameters
When creating a JSON data source using HTTP Client as Data Route and POST as HTTP Method, there are two ways of adding...
Read more >
Sending JSON HTTP Request Body in Terminal - Baeldung
Learn how to send JSON objects as the request body correctly.
Read more >
How to receive json data in web api? - Microsoft Q&A
I am using .net core web api but I can not receive json data. public async Task<IActionResult>PostAsync(string username,string password) ...
Read more >
Angular - HTTP POST Request Examples - Jason Watmore's
LAST UPDATED: NOVEMBER 08 2022 - A quick set of examples to show how to send HTTP POST requests from Angular to a...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found