1
0
Fork 0
mirror of https://github.com/edgurgel/httparrot synced 2025-04-06 00:32:34 -04:00

Compare commits

..

No commits in common. "master" and "v1.4.0" have entirely different histories.

8 changed files with 37 additions and 80 deletions

View file

@ -1,10 +0,0 @@
#!/usr/bin/env bash
# exit on error
set -o errexit
# Initial setup
mix deps.get --only prod
MIX_ENV=prod mix compile
# Build the release and overwrite the existing release directory
MIX_ENV=prod mix release --overwrite

View file

@ -41,7 +41,7 @@ defmodule Httparrot.Mixfile do
licenses: ["MIT"],
links: %{
"Github" => @source_url,
"HTTParrot" => "https://httparrot.onrender.com/",
"HTTParrot" => "http://httparrot.herokuapp.com",
"httpbin" => "http://httpbin.org"
}
]

View file

@ -56,7 +56,7 @@
<div class='mp'>
<h1>httparrot(1): HTTP Request &amp; Response Service</h1>
<p>Freely hosted in <a href="https://httparrot.onrender.com/">HTTPS</a>
<p>Freely hosted in <a href="http://httparrot.herokuapp.com">HTTP</a> &amp; <a href="https://httparrot.herokuapp.com">HTTPS</a>
<h2 id="ENDPOINTS">ENDPOINTS</h2>
@ -104,46 +104,34 @@ scenarios. Additional endpoints are being considered (e.g. <code>/deflate</code>
<h2 id="EXAMPLES">EXAMPLES</h2>
<h3 id="-curl-http-httparrot-org-ip">$ curl https://httparrot.onrender.com/</h3>
<h3 id="-curl-http-httparrot-org-ip">$ curl http://httparrot.herokuapp.com/ip</h3>
<pre><code>{"origin": "24.127.96.129"}
</code></pre>
<h3 id="-curl-http-httparrot-org-user-agent">$ curl https://httparrot.onrender.com/user-agent</h3>
<h3 id="-curl-http-httparrot-org-user-agent">$ curl http://httparrot.herokuapp.com/user-agent</h3>
<pre><code>{"user-agent": "curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3"}
</code></pre>
<h3 id="-curl-http-httparrot-org-get">$ curl https://httparrot.onrender.com/get</h3>
<h3 id="-curl-http-httparrot-org-get">$ curl http://httparrot.herokuapp.com/get</h3>
<pre><code>
{
<pre><code>{
"args": {},
"headers": {
"accept": "*/*",
"accept-encoding": "gzip",
"cdn-loop": "cloudflare; subreqs=1",
"cf-connecting-ip": "118.148.71.18",
"cf-ew-via": "15",
"cf-ipcountry": "NZ",
"cf-ray": "899c4ca20494508c-AKL",
"cf-visitor": "{\"scheme\":\"https\"}",
"cf-worker": "onrender.com",
"host": "httparrot.onrender.com",
"render-proxy-ttl": "4",
"rndr-id": "1cf65e46-55f1-429d",
"true-client-ip": "118.148.71.18",
"user-agent": "curl/7.81.0",
"x-forwarded-for": "118.148.71.18, 10.213.36.192, 10.214.43.80",
"x-forwarded-proto": "https",
"x-request-start": "1719395492280333"
"Accept": "*/*",
"Connection": "close",
"Content-Length": "",
"Content-Type": "",
"Host": "httparrot.herokuapp.com",
"User-Agent": "curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3"
},
"url": "http://httparrot.onrender.com/get",
"origin": ""
}
"origin": "24.127.96.129",
"url": "http://httparrot.herokuapp.com/get"
}
</code></pre>
<h3 id="-curl-I-http-httparrot-org-status-418">$ curl -I https://httparrot.onrender.com/status/201</h3>
<h3 id="-curl-I-http-httparrot-org-status-418">$ curl -I http://httparrot.herokuapp.com/status/201</h3>
<pre><code>HTTP/1.1 201
Server: Cowboy

View file

@ -1,8 +1,6 @@
@echo off
rem Set the release to load code on demand (interactive) instead of preloading (embedded).
rem set RELEASE_MODE=interactive
rem Set the release to work across nodes.
rem RELEASE_DISTRIBUTION must be "sname" (local), "name" (distributed) or "none".
rem Set the release to work across nodes. If using the long name format like
rem the one below (my_app@127.0.0.1), you need to also uncomment the
rem RELEASE_DISTRIBUTION variable below.
rem set RELEASE_DISTRIBUTION=name
rem set RELEASE_NODE=<%= @release.name %>
rem set RELEASE_NODE=<%= @release.name %>@127.0.0.1

View file

@ -1,20 +1,14 @@
#!/bin/sh
# # Sets and enables heart (recommended only in daemon mode)
# case $RELEASE_COMMAND in
# daemon*)
# Sets and enables heart (recommended only in daemon mode)
# if [ "$RELEASE_COMMAND" = "daemon" ] || [ "$RELEASE_COMMAND" = "daemon_iex" ]; then
# HEART_COMMAND="$RELEASE_ROOT/bin/$RELEASE_NAME $RELEASE_COMMAND"
# export HEART_COMMAND
# export ELIXIR_ERL_OPTIONS="-heart"
# ;;
# *)
# ;;
# esac
# fi
# # Set the release to load code on demand (interactive) instead of preloading (embedded).
# export RELEASE_MODE=interactive
# # Set the release to work across nodes.
# # RELEASE_DISTRIBUTION must be "sname" (local), "name" (distributed) or "none".
# Set the release to work across nodes. If using the long name format like
# the one below (my_app@127.0.0.1), you need to also uncomment the
# RELEASE_DISTRIBUTION variable below.
# export RELEASE_DISTRIBUTION=name
# export RELEASE_NODE=<%= @release.name %>
# export RELEASE_NODE=<%= @release.name %>@127.0.0.1

View file

@ -1,12 +0,0 @@
## Customize flags given to the VM: https://www.erlang.org/doc/man/erl.html
## -mode/-name/-sname/-setcookie are configured via env vars, do not set them here
## Increase number of concurrent ports/sockets
##+Q 65536
## Tweak GC to run more often
##-env ERL_FULLSWEEP_AFTER 10
## Enable deployment without epmd
## (requires changing both vm.args and remote.vm.args)
##-start_epmd false -erl_epmd_port 6789 -dist_listen false

View file

@ -1,12 +1,11 @@
## Customize flags given to the VM: https://www.erlang.org/doc/man/erl.html
## Customize flags given to the VM: http://erlang.org/doc/man/erl.html
## -mode/-name/-sname/-setcookie are configured via env vars, do not set them here
## Number of dirty schedulers doing IO work (file, sockets, etc)
##+SDio 5
## Increase number of concurrent ports/sockets
##+Q 65536
## Tweak GC to run more often
##-env ERL_FULLSWEEP_AFTER 10
## Enable deployment without epmd
## (requires changing both vm.args and remote.vm.args)
##-start_epmd false -erl_epmd_port 6789false