This file contains hidden or 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
try { | |
$url = "https://wahal.free.beeceptor.com" | |
$body = @{ | |
"key" = "value" | |
} | ConvertTo-Json | |
$response = Invoke-WebRequest -Uri $url -Method POST -Body $body -ContentType "application/json" | |
if ($response.StatusCode -ne 200) { | |
throw "Request failed with status code: $($response.StatusCode)" |
This file contains hidden or 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 main | |
import ( | |
"crypto/rsa" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"os" | |
"github.com/aws/aws-sdk-go/aws" |
This file contains hidden or 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
# Statsd Tutorial Application | |
# Author: Mrinal Wahal | |
# import dependencies | |
from flask import Flask, request | |
from flask import render_template | |
from flask import redirect | |
from flask_sqlalchemy import SQLAlchemy |
This file contains hidden or 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
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl |