Skip to content

Instantly share code, notes, and snippets.

View thefringeninja's full-sized avatar
🍿

João Bragança thefringeninja

🍿
View GitHub Profile
## convert HTML POST data or HTTP GET query string to JSON
## get the raw post data from the AWS built-in variable and give it a nicer name
#if ($context.httpMethod == "POST")
#set($rawAPIData = $input.path("$"))
#elseif ($context.httpMethod == "GET")
#set($rawAPIData = $input.params().querystring)
#set($rawAPIData = $rawAPIData.toString())
#set($rawAPIDataLength = $rawAPIData.length() - 1)
#set($rawAPIData = $rawAPIData.substring(1, $rawAPIDataLength))
@thefringeninja
thefringeninja / build.ps1
Last active May 8, 2017 15:22
build.ps1 for Cake 0.18
##########################################################################
# This is the Cake bootstrapper script for PowerShell.
# This file was downloaded from https://github.com/cake-build/resources
# Feel free to change this file to fit your needs.
##########################################################################
<#
.SYNOPSIS
This is a Powershell script to bootstrap a Cake build.
public interface IHttpMessageSerializer
{
void Serialize(HttpResponseMessage response, Stream stream);
void Serialize(HttpRequestMessage request, Stream stream);
HttpResponseMessage DeserializeToResponse(Stream stream);
HttpRequestMessage DeserializeToRequest(Stream stream);
}
public class MessageContentHttpMessageSerializer : IHttpMessageSerializer