Skip to main content

All Questions

Tagged with
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. ...
user1664377's user avatar
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 ...
Sergei Grimanov's user avatar
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 ...
Sergei Grimanov's user avatar
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 ...
Felipe Moreno's user avatar
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 ...
Ilja Tarasovs's user avatar
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":...
wikijames's user avatar
  • 192
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 ...
GetWhimsical's user avatar
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" ...
GetWhimsical's user avatar
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",...
Rishi Beohar's user avatar
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 ...
Josh Williams's user avatar
-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 ...
UltimateTechDiscovery's user avatar
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 ...
Tuomas Toivonen's user avatar
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 ...
Felix's user avatar
  • 2,651
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 ...
dpericks's user avatar
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/...
Hypothesis's user avatar
  • 1,328

15 30 50 per page
1
2 3 4 5
13