What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-17 20:23:19
react native post api method
fetch('https://mywebsite.com/endpoint/', { method: 'POST', headers: { Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({ firstParam: 'yourValue', secondParam: 'yourOtherValue', }),}).then((response) ... Add solution -
Javascript 2021-11-14 08:57:17
openweathermap api javascript
// Full tutorial: https://www.youtube.com/watch?v=WZNG8UomjSI fetch( "https://api.openweathermap.org/data/2.5/weather?q=" + city + "&units=metric&appid=" + apiKey ) .then((response) => response.json()) .th... Add solution -
Javascript 2021-11-14 08:17:19
añadir react a node project
import React, { Component } from 'react';import logo from './logo.svg';import './App.css';class App extends Component { constructor(){ super() this.state = { numero: 0 } this.handleRandom = this.handleRandom.bind(this) this.handleRand... Add solution -
Other 2021-11-13 00:14:17
fetch API javascript sintax
const data = { username: 'example' }; fetch('https://example.com/profile', { method: 'POST', // or 'PUT' headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(data), }) .then(response => response.json()) .then(data => {... Add solution -
Python 2021-11-10 02:28:19
add bearer token in python request
import requests auth_token='sdfghjkloerdtfyguhiopfghjkl;fghjkl' hed = {'Authorization': 'Bearer ' + auth_token} data = {'app' : 'aaaaa'} url = 'https://api.xy.com' response = requests.post(url, json=data, headers=hed) print(response) print(response.json()) Add solution
Best helpers
Ranking is empty