What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-02-01 09:51:18
how to use fetch() to fetch an image from database in js
let fetchURL = 'http://192.168.22.124:3000/source/'; let image = name.map((picName) => { return picName }) fetch(fetchURL + image) .then(response => response.json()) .then(images => console.log(fetchURL + images)); Add solution -
Javascript 2022-01-31 01:26:15
sttripe for payment in react native andorid
import React from 'react';import AddSubscriptionView from '../components/AddSubscriptionView';const STRIPE_ERROR = 'Payment service error. Try again later.';const SERVER_ERROR = 'Server error. Try again later.';const STRIPE_PUBLISHABLE_KEY = 'Your Key';/*... 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