Questions tagged as 'jsonp'

2
answers

How to extract json from a jsonp into a string in Scala

I'm using Scala and I have an http response like this: _SS_MainSolrCallbackH( { response: { numFound: 1, start: 0, maxScore: 4.9338827, docs: [ { tipo: "M", id: "mus1933196",a s: 4....
asked by 11.08.2014 / 18:35
2
answers

Is there any risk in not validating the name of a function used in JSONP?

Generally, when you make a service JSONP one of the things to be passed by parameter is the name of the callback that will be used in javascript. Example: $dados = [1, 2, 3]; $json = json_encode($dados); $callback = $_GET['callback...
asked by 07.08.2015 / 17:32
2
answers

Difficulty with AJAX and JSONP

I have a problem with the ajax return with jsonp, it returns json, but I can not work with it. Code: $.ajax({ method: "GET", url: "http://minasul.tecnologia.ws/previsao/index.php?tipo=TODAS", async: false, contentType: "...
asked by 13.08.2015 / 14:17
1
answer

JSONP: status code 200 OK and even then returns $ .Ajax (... error: function () ...)

We're having a hard time making a request $.ajax , JSONP. The problem is that even with positive feedback (Status Code: 200) the function shown below always returns the error-checking result as positive. $(document).ready(function()...
asked by 15.02.2015 / 01:21
1
answer

AJAX request with different domain

My Request url="http://algumip:algumaporta/dowPDFNF?cChave="+chave $.ajax({ url: url, dataType: 'jsonp', success: function (data) { console.log(JSON.stringify(data)); }, type: 'POST' }); error that returns: U...
asked by 10.05.2018 / 16:03
1
answer

"Uncaught SyntaxError: Unexpected token:" error when trying to fetch data in JSON format from another URL

I'm trying to get data from a URL that returns JSON to use on my page. Apparently I'm getting the data, but for some reason I get the following error in the browser console:    "Uncaught SyntaxError: Unexpected token:". For...
asked by 26.07.2016 / 03:27
1
answer

AJAX receives JSONP as "undefined"

First of all I wanted to say that I was researching for it here in the forum and I found some similar questions, but no answer worked here. Next, I have a php file on the server that connects to the database, makes a query and returns the jso...
asked by 22.05.2016 / 01:36
2
answers

Problems in returning a JSONP

I'm trying to get a response from my API like JSONP but it's not right. Ajax code is this: $.ajax({ type: 'GET', url: url, async: false, contentType: "application/json", dataType: 'js...
asked by 25.09.2015 / 16:22
1
answer

JSON return with error: SyntaxError: missing; before statement

I'm having a problem with the JSON return, and I've researched and found no solution. I have the following requisition: var url = 'http://zcash.flypool.org/api/miner_new/t1UjazwJJnrUGoPh4GJYJ9FV6sYFzYg6H63?callback=?'; $.getJSON(url, func...
asked by 14.06.2017 / 20:19
0
answers

Angular jsonp return

What's wrong with this request. The error that appears in the console is $ sce: insecurl. Untrusted source resource ... $scope.pegaCNPJ = function () { var cnpj = $("#clienteCNPJ").val().replace(/[^\d]+/g, ''); $http.json...
asked by 05.07.2018 / 02:26