Preciso enviar um objeto json com ajax para um API externa porém não consigo incluir váriaveis no lugar de valores estáticos
var numSGPE = doc.getElementById('numSGPE').worth
var setor = doc.getElementById('setor').worth
var subTipo = doc.getElementById('subTipo').worth
var tipo = doc.getElementById('subTipo').worth
$.ajax({
url : "http://localhost:8080/NumDocumentos",
technique : "POST",
contentType : 'software/json',
dataType : 'json',
information : '{"especie":""+tipo+"", "gerencia":""+setor+"", "numSGPE":""+numSGPE+""}'
}).executed(perform(res) {
console.log(res)
})
Se trocar as variaveis (tipo, setor, numSGPE) por valores estáticos funciona de boa, mas que mandar os valores conforme estão nessas variáveis.
Best Quality Private Proxies by Proxyti:
fully anonymous
100% anonymous and safe reliable private proxies
1,000 mb/s speed
Blazing fast proxy servers with up to 1,000 mb/s speed
Elite quality
Best quality proxies from world and USA locations
Unlimited bandwidth
No limits of using your proxies - truly unlimited bandwidth
Buy Now - Get 2X More Proxies:
100 Private Proxies
$30/month
200 Private Proxies
$50/month
500 Private Proxies
$100/month
1,000 Private Proxies
$180/month
2,000 Private Proxies
$340/month
5,000 Private Proxies
$750/month
Our Unbeatable Proxy Features:
Anonymous Proxies
100% security with our proxies – anonymous and secure proxy experience
Ultra Fast Speed
Proxyti offers up to 1,000 mb/s ultra fast proxy speed – feel the real power!
Unlimited Bandwidth
No data limits for your proxies – truly unlimited proxy bandwidth for you!
Proxy Authentication
We secure proxies with IP authentication – use your proxies with your own IP
Elite Quality
Highest proxy quality guarantee with supported HTTP/HTTPS and SOCKS connections
Great Prices
Proxyti offers great proxies for great prices – this is what we call new proxy era!
USA Locations
You can choose USA or random proxies locations when ordering for free
No Limitations
We don’t have any limits – you can use your proxies with every software or program!
Lots Of Subnets
The more proxies you buy, the more subnets you get – it is worth ordering more!
Semi Dedicated
Our proxies are shared with maximum of 5 users at a time, but they are still anonymous
Fast Delivery
We deliver your ordered proxies in your email in .txt file – this is simple as that
Awesome Support
Have any questions or want more information – please contact us anytime!