Price Analytics

GRATIS CON POSSIBILITÀ DI UPGRADE
Da 3B Data / @CRAWLER2API | Aggiornamento 20 days ago | eCommerce
Popolarità

9.7 / 10

Latenza

174ms

Livello di servizio

100%

Health Check

N/A

Torna a tutte le discussioni

I have undefined error at second .then

Rapid account: Shashankpmakhare
shashankpmakhare
24 days ago

<html>
<head>
<title>Price Analytics</title>

</head>

<body>
	<h1>Price Analytics</h1>
	<table border = "2" align = "center">
		<form>
			<tr>
				<th>platform</th>
				<td><input type = "text" id ="platform"></td>
			</tr>
			<tr>
				<th>Country</th>
				<td><input type = "text" id = "Country"></td>
			</tr>
			<tr>
				<th>Values</th>
				<td><input type = "text" id = "Values"</td>
			</tr>
			<tr>
				<th colspan = "2" align ="center"><input type = "submit" value = "submit" id = "submit"></th>
			</tr>
		</form>
	</table>
	
	
	
	<span id = "job"></span>
	<script>
	
		var x 
	
		const options = {
			method: 'POST',
			headers: {
				'content-type': 'application/x-www-form-urlencoded',
				'X-RapidAPI-Key': '219c800df2msh4a333777024e779p198324jsn090a6c09f816',
				'X-RapidAPI-Host': 'price-analytics.p.rapidapi.com'
			},
			
			body: new URLSearchParams({
				source: platform.value,
				country: Country.value,
				values: Values.value
			}).toString()
		};
		
		/*
		const optionss = {
			method: 'GET',
			headers: {
				'X-RapidAPI-Key': '219c800df2msh4a333777024e779p198324jsn090a6c09f816',
				'X-RapidAPI-Host': 'price-analytics.p.rapidapi.com'
			}
		};
		*/
		
		//'https://price-analytics.p.rapidapi.com/poll-job/660d51a0d199146ae85b1808'
		const site = () => {
			fetch('https://price-analytics.p.rapidapi.com/search-by-term', options)
			.then((response) => {return response.json()})
			.then((data) => {console.log(data.text)
				
				job.textContent = data.job_id;

			})
		}
		
		site()
			
		/*	
		const platform = (Source) => {
			fetch('https://price-analytics.p.rapidapi.com/poll-job/'+ x, optionss)
			.then((response) => {return response.json()})
			.then((data) => {console.log(data)
			
		*/
	</script>
</body>

</html>

Partecipa alla discussione - aggiungi un commento di seguito:

Accedi/Iscriviti per pubblicare nuovi commenti