[erlang-questions] Rest endpoint behaving strangely

Pavanan M S <>
Tue Mar 1 12:38:36 CET 2016


Sorry the response code is *303 not 302*

On 1 March 2016 at 15:46, Loïc Hoguin <> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160301/e370aa05/attachment.html>


More information about the erlang-questions mailing list