All Questions
192
questions
0
votes
2
answers
185
views
How to take a JSON content and return it in a wordpress function (php)?
I have a wordpress endpoint and I have some json data.
Unfortunately I dont know how to return this json data in the function. I tried json_decode but it doesn't return anything. Then endpoint works. ...
1
vote
1
answer
42
views
I need to send an object from an html form as a json string, but I have a string
I try to send an ajax request to my rest controller to edit an object user. One of the fields of it is a list of roles. Each role has Id and name, but when I fill the form I put this option in a ...
0
votes
1
answer
33
views
How to convert an html form into ajax request for a rest controller if one of the fields multi select?
The problem is that field "roles" is a select list with multiple-choice, so the field has to be converted into an array. I could not find any piece of info about how to do it. Need help.
I'm ...
0
votes
1
answer
46
views
how to make correct format json using javascript to use a service?
I'm calling a service, I have already the correct conection but I have a error, I think so the format json is incorrect.
ERROR: net::ERR_ABORTED 500 (Internal Server Error).
I'm using Jquery Ajax
...
0
votes
2
answers
48
views
How to get JSON response after ajax method POST
I make a post request to my rest controller and as a result I want to get information about the error in case of incorrect data. Error information is generated in @RestControllerAdvice.
Here is my ...
0
votes
1
answer
134
views
How to populate Grid with ajax where data coming from REST API JSON format?
I am having an issue, i got JSON format data from backend in this
format, and i am having trouble fetching data to table.
>JSON Format:
{
"success": true,
"code": "200",
"message":...
0
votes
1
answer
31
views
Receiving 'data is not defined' error in console when doing a POST query in AJAX
I'm working on a form that writes to a SharePoint list when submitting as a new entry in the list. I've got the AJAX code in place and it seems to connect out to the list okay, however I'm receiving ...
0
votes
1
answer
532
views
Is there a way to search a field in a JSON array that can contain multiple values for a specific value?
I have an ajax query that returns results and should display them in an html table like the below:
<input type="button" value="Customer" onclick="SelectCustomer()">
<input type="button" ...
0
votes
1
answer
250
views
Passing list of JSON objects to Controller via AJAX call
Below is the data I am trying to pass
var data=[{"TAG":"Taxes","REMARKS":"Enter Remarks"},{"TAG":"Taxes","REMARKS":"Enter Remarks"}];
Ajax call to post data to controller:
$.ajax({
type: "POST",...
0
votes
0
answers
111
views
POST Nested Json to API With Jquery Ajax & Get Response With PHP
I want to Post a Json string or PHP array to a Restful API and get the response without reloading the page. So, I want to use Ajax and/or jquery. So far, I'm failing miserably. my code is below.
I've ...
-1
votes
2
answers
78
views
Sending JavaScript Object through AJAX works, JSON doesn't?
I'm trying to send data through AJAX and most places I read online say I need to send it as JSON. However, If I try to send it as JavaScript Object it actually works, wheres if I try to send it as ...
0
votes
1
answer
990
views
REST API and value objects
What is the best practice implementing REST API endpoint for value objects? Consider application settings managed by some UI which communicates with REST API. Here the settings is value object. In ...
0
votes
1
answer
2k
views
Cross-Origin Request Blocked on Ajax Request
This is a bit of a noob question and I'm new to API requests and AJAX so bear with me.
This request has a JWT token (which i'm doubly unfamiliar with), and I was able to get the request to work with ...
0
votes
1
answer
482
views
REST API call returning undefined list from JSON
I'm attempting to display a list of presidential candidate names from the FEC REST API on a website and am getting a list of three bulleted items that just say "undefined."
I've tried this with ...
0
votes
1
answer
1k
views
How to update through cockpit api
I need to be able to update through the cockpit api but it creates a new entry.
I have tried to use the same credentials but still made a new entry.
Create / Update collection entries
fetch('/api/...