This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function renderRoute(request, reply) { | |
const store = configureStore(); | |
store.dispatch(match(request.path, (error, redirectLocation, routerState) => { | |
if (redirectLocation) { | |
reply.redirect(redirectLocation.pathname + redirectLocation.search); | |
} else if (error) { | |
reply(error.message).code(500); | |
} else if (!routerState) { | |
reply('Not found').code(404); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function postComplex() { | |
// to show that stringifying real dates does work as well | |
var date = new Date(); | |
var events = { | |
name: "Olli", | |
events: [ | |
{ | |
title: "Strategy Meeting", | |
startTime: "Fri Feb 01 10:00:00 CET 2013", | |
endTime: "Fri Feb 01 11:30:00 CET 2013", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.net.URL; | |
public class DownloadGET { | |
public static void main(String[] args) throws Exception { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.floreysoft.sandbox; | |
import static com.google.appengine.api.urlfetch.FetchOptions.Builder.withDefaults; | |
import java.io.IOException; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static com.google.appengine.api.urlfetch.FetchOptions.Builder.withDefaults; | |
import java.io.IOException; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static com.google.appengine.api.urlfetch.FetchOptions.Builder.withDefaults; | |
import java.io.IOException; | |
import java.net.URL; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import com.google.appengine.api.urlfetch.HTTPMethod; |