Linked Questions
23 questions linked to/from Jquery - How to make $.post() use contentType=application/json?
0
votes
1
answer
5k
views
How send JSON data on $.post() | jQuery [duplicate]
I tried in 2 ways:
saving the json on a var
var dataLog = JSON.stringify( {
"clientId": "1",
"sensor": "Temp",
"dateStart": "2016-09-03 00:00:00",
"dateEnd": "2016-09-03 00:59:59"
} );
$....
78
votes
13
answers
264k
views
SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3, Could not complete the operation due to error 00002ef3
I keep receiving this error when I do some Ajax calls...
It may even be something to do with Geocoding but I really have no idea how to capture the error to display something useful to users... or ...
52
votes
5
answers
49k
views
Django REST Framework POST nested objects
I'm facing a little problem right now with Django Rest Framework. I'm trying to post an object with nested objects in it.
Here are my serializers.py:
class ClassSerializer(serializers....
18
votes
2
answers
29k
views
PUT file to S3 with presigned URL
I've been playing with Amazon S3 presigned URLs all night attempting to PUT a file. I generate the presigned URL in java code.
AWSCredentials credentials = new BasicAWSCredentials( accessKey, ...
11
votes
3
answers
7k
views
Jquery Post to ASP.NET API Controller
I have a form that is generated via jquery:
$.get("/api/get/getListItems", function (data) {
var table = "";
table += "<table>";
$.each(data, ...
9
votes
3
answers
15k
views
ASPNET MVC - Why is ModelState.IsValid false "The x field is required" when that field does have a value?
I have a model like this:
public PurchaseOrder
{
[Required] [StringLength(15)]
public virtual string OrderNumber {get;set;}
// etc.
}
When I submit an order from the view (using $...
1
vote
4
answers
5k
views
PHP receiving Json
I'm using knockout and I'm trying to send information to PHP, using firebug to check Network -> Headers I have this:
Request URL:http://localhost/loyalty/welcome/json/
Request Method:POST
Status Code:...
0
votes
1
answer
7k
views
Flask request.get_json() not receiving anything from $.post() request [duplicate]
I am trying to communicate data between JavaScript and Python, and I am doing that by using JSON variables, but it seems that whenever I make a POST request from JavaScript, request.get_json() in the ...
2
votes
2
answers
6k
views
$.ajaxSetup does not set content type for Get requests
Code 1
$.ajax({url:"1.aspx/HelloWorld",type:"GET",dataType:"json",contentType:"application/json"});
Code 2
$.ajaxSetup({
contentType: "application/json&...
4
votes
2
answers
13k
views
sending a post request with json data that contains a list
Solved. The solution is to set contentType to 'application/json' and use the JSON.stringify(obj) instead of obj, but you may then have to change how you get the data on your server, depending on the ...
3
votes
1
answer
2k
views
POST vs. GET request differences in Google Analytics API Version 4
Google Analytics v4 API now uses POST requests instead of GET request. And there are no good javascript examples out there yet for me to follow. I'm getting empty object Object { }, but I'm sure that ...
0
votes
2
answers
2k
views
JSON POST to a server never arriving
I have an issue posting some JSON to a web service built using Jersey REST. The data never seems to arrive at the server.
The overall task flow is somewhat like this:
Javascript POST JSON -> ...
0
votes
1
answer
808
views
Edit returned data and send edited data back using AJAX
I want to edit returned data from AJAX, and then return back that edited data using AJAX.
The first AJAX request succeeds but the second doesn't. I can't find out what is wrong. Any help please?
...
0
votes
2
answers
427
views
jQuery $.post(url, json, promise, "json") has bad request while $.ajax() doesn't. Don't know why?
In jQuery, I am referencing https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
. But I think I have problems with jQuery's $.post() when I follow their template very closely, i.e.,
$....
0
votes
1
answer
327
views
WebApi Not Deserializing Correctly
I'm at my wit's end here. I think I just need another set of eyes.
Method Signature:
public async Task<IHttpActionResult> Post(ApiRequest request)
Model:
[SuppressMessage("ReSharper", "...