What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-03 02:17:03
python get city name from IP
import re import json from urllib2 import urlopen url = 'http://ipinfo.io/json' response = urlopen(url) data = json.load(response) IP=data['ip'] org=data['org'] city = data['city'] country=data['country'] region=data['region'] print 'Your IP detail\n '... Add solution -
Other 2021-10-02 10:35:06
how can hit curl api from sendgrid
curl --request POST \ --url https://api.sendgrid.com/v3/mail/send \ --header 'Authorization: Bearer YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{"personalizations": [{"to": [{"email": "rec... Add solution -
Javascript 2021-10-01 01:31:07
How to use fetch api
//Obj of data to send in future like a dummyDb const data = { username: 'example' }; //POST request with body equal on data in JSON format fetch('https://example.com/profile', { method: 'POST', headers: { 'Content-Type': 'application/json', }, ... Add solution