[erlang-questions] Rest endpoint behaving strangely

Loïc Hoguin <>
Tue Mar 1 11:16:46 CET 2016


I think you didn't say which server you are using. Not Cowboy 
considering the 404 you get.

On 03/01/2016 08:57 AM, Pavanan M S wrote:
> Hi all,
>           I created a few rest end points for an app and it works. Now I
> am starting to write the test cases. But there is a strange issue in my
> code.
>
>          When I connect the rest client with url  "
> http://localhost:8080/[resource_name] " it works perfectly.
>
>          But if I use " http://localhost:8080/[resource_name]*/ *" , (A
> slash ( '/' ) in the end) it gives a 404.
>
>          Now that I am trying to write test cases using common test, I
> just tried to make requests using ibrowse first. And there I found
> something strange again.
>
>          When I used ibrowse to issue a post request, it returned 302,
> with the location of the resource. In the browser I am getting 200, I
> guess because of get.
>
>           Now, since get is working, I guess the resource is being
> created, Then what might be the reason that I am not getting 201 ? Also,
> Is this related to the above problem ?
>          Please help.
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>

-- 
Loïc Hoguin
http://ninenines.eu
Author of The Erlanger Playbook,
A book about software development using Erlang


More information about the erlang-questions mailing list