Skip to content

Instantly share code, notes, and snippets.

@AndyDangerous
Created October 29, 2016 00:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndyDangerous/b4a4d2faf015a535c96de26bf897e6c3 to your computer and use it in GitHub Desktop.
Save AndyDangerous/b4a4d2faf015a535c96de26bf897e6c3 to your computer and use it in GitHub Desktop.
Plug.Conn from my phone sent to my little phoenix thing though twilio
%Plug.Conn{adapter: {Plug.Adapters.Cowboy.Conn, :...}, assigns: %{},
before_send: [#Function<1.27086174/1 in Plug.Logger.call/2>,
#Function<0.78287744/1 in Phoenix.LiveReloader.before_send_inject_reloader/1>],
body_params: %{"AccountSid" => "My-Account-Sid",
"ApiVersion" => "2010-04-01", "Body" => "Hello", "From" => "+12076666",
"FromCity" => "PORTLAND", "FromCountry" => "US", "FromState" => "ME",
"FromZip" => "04101", "MessageSid" => "SMb9ef4379773d0515b906ea007d5a3934",
"NumMedia" => "0", "NumSegments" => "1",
"SmsMessageSid" => "some-SmsMessageSid",
"SmsSid" => "some-SmsSid", "SmsStatus" => "received",
"To" => "+17196666666", "ToCity" => "", "ToCountry" => "US",
"ToState" => "CO", "ToZip" => ""},
cookies: %Plug.Conn.Unfetched{aspect: :cookies}, halted: false,
host: "86d337df.ngrok.io", method: "POST", owner: #PID<0.427.0>,
params: %{"AccountSid" => "AC361f3929170e387189aa82722337369a",
"ApiVersion" => "2010-04-01", "Body" => "Hello", "From" => "+12076666666",
"FromCity" => "PORTLAND", "FromCountry" => "US", "FromState" => "ME",
"FromZip" => "04101", "MessageSid" => "SMb9ef4379773d0515b906ea007d5a3934",
"NumMedia" => "0", "NumSegments" => "1",
"SmsMessageSid" => "some-SmsMessageSid",
"SmsSid" => "some-SmsSid", "SmsStatus" => "received",
"To" => "+17194276166", "ToCity" => "", "ToCountry" => "US",
"ToState" => "CO", "ToZip" => ""}, path_info: ["twilio", "sms"],
peer: {{127, 0, 0, 1}, 49847}, port: 80,
private: %{WebApp.Router => {[], %{}}, :phoenix_action => :message,
:phoenix_controller => WebApp.SmsController,
:phoenix_endpoint => WebApp.Endpoint, :phoenix_format => "json",
:phoenix_layout => {WebApp.LayoutView, :app}, :phoenix_pipelines => [:api],
:phoenix_route => #Function<1.56354572/1 in WebApp.Router.match_route/4>,
:phoenix_router => WebApp.Router, :phoenix_view => WebApp.SmsView,
:plug_session_fetch => #Function<1.82590416/1 in Plug.Session.fetch_session/1>},
query_params: %{}, query_string: "", remote_ip: {127, 0, 0, 1},
req_cookies: %Plug.Conn.Unfetched{aspect: :cookies},
req_headers: [{"accept", "*/*"}, {"cache-control", "max-age=259200"},
{"content-length", "396"},
{"content-type", "application/x-www-form-urlencoded"},
{"host", "86d337df.ngrok.io"},
{"x-twilio-signature", "HwO44xWctljdVfOf0="},
{"user-agent", "TwilioProxy/1.1"}, {"connection", "close"},
{"x-forwarded-for", "52.90.134.3"}], request_path: "/twilio/sms",
resp_body: nil, resp_cookies: %{},
resp_headers: [{"cache-control", "max-age=0, private, must-revalidate"},
{"x-request-id", "dm2lurseco04ohsph84i2vlvf9vd6u03"}], scheme: :http,
script_name: [],
secret_key_base: "some-secret-key",
state: :unset, status: nil}
@AndyDangerous
Copy link
Author

Body Params

%{
  "AccountSid" => "My-Account-Sid",
  "ApiVersion" => "2010-04-01",
  "Body" => "Hello",
  "From" => "+12076666666",
  "FromCity" => "PORTLAND",
  "FromCountry" => "US",
  "FromState" => "ME",
  "FromZip" => "04101",
  "MessageSid" => "SMb9ef4379773d0515b906ea007d5a3934",
  "NumMedia" => "0",
  "NumSegments" => "1",
  "SmsMessageSid" => "some-SmsMessageSid",
  "SmsSid" => "some-SmsSid",
  "SmsStatus" => "received",
  "To" => "+17196666666",
  "ToCity" => "",
  "ToCountry" => "US",
  "ToState" => "CO",
  "ToZip" => ""
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment