182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
187
188 try {
189 const response = await fetch("/", {
190 method: "POST",
191 body: JSON.stringify({
154
155 // Serve cached response if less than 1 minute old
156 const imageResponse = await fetch(imageUrl);
157
158 if (imageResponse.ok) {
229
230 try {
231 const response = await fetch(unsplashApiUrl, {
232 headers: {
233 "Accept-Version": "v1",
239 // Include the response body for more detailed error information
240 const errorBody = await response.text();
241 return new Response(`Failed to fetch from Unsplash API: ${errorBody}`, { status: response.status });
242 }
243
247 const imageUrl = `${photo.urls.raw}${additionalParams ? `&${additionalParams}` : ""}`;
248
249 // Fetch the specific image
250 const imageResponse = await fetch(imageUrl);
251
252 if (!imageResponse.ok) {
68
69 try {
70 const response = await fetch('/analyze', {
71 method: 'POST',
72 body: formData
23
24 try {
25 const response = await fetch('/analyze', {
26 method: 'POST',
27 body: formData
1console.log("hi");
2await fetch("https://shouser--83d37324cc6c11efb88ce6cdfca9ef9f.web.val.run?normalscriptval=true")
3 .then(response => console.log(response.json()))
4 .then(data => console.log(data))
81
82 try {
83 const response = await fetch("/chat", {
84 method: "POST",
85 headers: { "Content-Type": "application/json" },
170 }
171
172 const response = await fetch(url.toString());
173 if (!response.ok) {
174 throw new Error(`Google Maps API error: ${response.statusText}`);