Questions tagged [cowboy]

Cowboy is a small, fast and modular HTTP server written in Erlang. Cowboy is also a socket acceptor pool, able to accept connections for any kind of TCP protocol.

Cowboy is a small, fast and modular HTTP server written in Erlang. Cowboy is also a socket acceptor pool, able to accept connections for any kind of TCP protocol.

https://github.com/extend/cowboy/

248 questions
0
votes
1 answer

What is the difference between opts and options in Elixir Plug.Adapters.Cowboy.http?

The function is defined as def http(plug, opts, options \\ []) do ... Why are there two arguments that appear to mean the same thing but have different names?
ijt
  • 3,505
  • 1
  • 29
  • 40
0
votes
2 answers

Cowboy on Erlang crashes on shutdown

I'm getting a lot of errors on shutdown of my Erlang vm related to my cowboy handlers. I've got a simple_one_for_one supervisor running a start_listeners() function that runs cowboy:start_http(). Everything starts, no errors, handles requests…
Matt
  • 207
  • 1
  • 7
0
votes
0 answers

Nitrogen wf.hrl file is deleted with a warning

I am using a slim_version of cowboy, I have also tried that on slim_yaws on nitrogen. What puzzles me is the abrupt deletion of the wf.hrl file by the VM. I do not understand what causes this!! Here is what appears in the console. Warning. Deleted…
0
votes
1 answer

Command 'generate' not found, compiling with rebar

I am following this blog: http://maplekeycompany.blogspot.se/2012/03/very-basic-cowboy-setup.html In short, I am trying to compile an application with rebar just as the person in the blog. Everything goes smoothly until I want to run the command:…
0
votes
1 answer

Error Returning boss_db data via websocket in chicago boss

I am trying to return data I get using boss_db over a websocket connection. In this example I want to return the questions I fetch, you can see the logs print out the question, however there is some error which is causing terminated with reason: bad…
BC00
  • 1,589
  • 3
  • 29
  • 47
0
votes
1 answer

[Cowboy-Erlang]: Error when pin-pointing to localhost:8080 using provided cowboy example web_server

I am trying out a cowboy example provided by this github repository: https://github.com/ninenines/cowboy/tree/master/examples/web_server I build the release successfully using erlang.mk and run the following command, which opens the Erlang shell in…
Jazzbaron
  • 75
  • 11
0
votes
1 answer

Example of REST file upload POST request?

I'm trying to make a RESTful server in Erlang with Cowboy, and I'm having trouble due to the fact that I know nothing about HTTP requests. I can't find an example of a RESTful file upload request, only a normal one. This works for a regular HTTP…
sudo
  • 5,604
  • 5
  • 40
  • 78
0
votes
0 answers

cowboy connection process terminated with enomem

I encountered an cowboy error Ranch listener api_resource had connection process started with cowboy_protocol:start_link/4 at <0.1822.0> exit with reason: enomem#012 In the request handler, I'm interacting with another vendor's tts platform, via…
jxiewei
  • 68
  • 6
0
votes
0 answers

Can't compile Cowboy

I'm using rebar for installing cowboy, but when I do (after rebar get-deps): > rebar compile I'm getting: - ==> cowboy (compile) src/cowboy_req.erl:1223: syntax error before: '{' src/cowboy_req.erl:226: function kvlist_to_map/2 undefined…
Pepeluis
  • 931
  • 2
  • 10
  • 18
0
votes
2 answers

Erlang supervisor processes

I have been learning Erlang intensively, and after finishing 'Programming Erlang' from Joe Armstrong, there is one thing that I keep coming back to. In my mind a Supervisor spawns One process per child handler. So each declared gen_server type…
antipatreal
  • 139
  • 4
0
votes
1 answer

Exception while generate a release in erlang cowboy using rebar?

I am creating Erlang Cowboy gen server chat Application, For that I have followed https://github.com/hcs42/cowboy_tutorial_webchat link. I am using Erlang/otp 17, But when I run "./rebar generate" it display following error. ERROR: generate failed…
nadim
  • 776
  • 1
  • 12
  • 26
0
votes
1 answer

Exception when running Cowboy start_listener()

I have followed http://maplekeycompany.blogspot.in/2012/03/very-basic-cowboy-setup.html link, but when I run this project it shows me crash report which tell that cowboy start_listener() is undefined. =CRASH REPORT==== 12-Aug-2014::10:08:06 === …
nadim
  • 776
  • 1
  • 12
  • 26
0
votes
1 answer

How to use post and get handlers in erlang-cowboy

Please help me as iam creating a new project i.e..,creating a login page using erlang-cowboy login page contains username,password and submit button when user enters the data and clicks the submit button in browser the details of the user should…
user3382006
  • 69
  • 1
  • 7
0
votes
1 answer

How to get number of concurrent sessions and average response latency in cowboy?

I have a rather simple web app built with on top of cowboy http server. What is the right way to measure miscellaneous health parameters in real-time, like 1, 5 and 10 minute averages of connections and response latency, etc?
Vladimir Lebedev
  • 1,207
  • 1
  • 11
  • 25
0
votes
1 answer

How to deal with a media-type for error messages of the Cowboy REST handler

I want the user to have the opportunity to choose the format in which it receives a response from the server, whether it is plain text, json or xml. It's looks like I must to retrieve media_type by calling cowboy_req:meta/{2,3} and then use it for…
boxx
  • 1,111
  • 2
  • 9
  • 15