[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modperl
Subject: Re: path recognition question
From: Jacques Deguest <jack () deguest ! jp>
Date: 2022-04-21 15:13:16
Message-ID: bbe01f75-24df-7720-2a5b-623f7a8f425e () deguest ! jp
[Download RAW message or body]
[Attachment #2 (multipart/mixed)]
[Attachment #4 (multipart/mixed)]
[Attachment #6 (multipart/alternative)]
[Attachment #8 (text/plain)]
If you are looking to build a REST api with Apache mod_perl, you might
be interested in Net::API::REST (https://metacpan.org/pod/Net::API::REST)
Jacques
On 2022/04/21 23:27, John Dunlap wrote:
> I sent this 8 years ago but, at the time, no one was interested.
> image.png
>
>
> On Thu, Apr 21, 2022 at 9:40 AM John Dunlap <John@lariat.co> wrote:
>
> I ended up writing something custom to do that.
>
> On Wed, Apr 20, 2022 at 11:22 PM Henrik S
> <henrik@tomatoservers.com> wrote:
>
> given the sample url:
>
> /api/user/id
>
> the part of "/api/user" is fixed. and there is a handler
> setup for this
> path.
>
> how to get the id part in mod_perl?
>
> in other framework I could get it with the similar format:
>
> /api/user/:id
>
> puts "hallo #{id}"
>
>
> Thank you.
>
>
>
> --
> John Dunlap
> /CTO | Lariat/
> /
> /
> /*Direct:*/
> /john@lariat.co/
> /
> *Customer Service:*/
> 877.268.6667
> support@lariat.co
>
>
>
> --
> John Dunlap
> /CTO | Lariat/
> /
> /
> /*Direct:*/
> /john@lariat.co/
> /
> *Customer Service:*/
> 877.268.6667
> support@lariat.co
[Attachment #9 (multipart/related)]
[Attachment #11 (text/html)]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="Avenir">If you are looking to build a REST api with
Apache mod_perl, you might be interested in Net::API::REST
(<a class="moz-txt-link-freetext" \
href="https://metacpan.org/pod/Net::API::REST">https://metacpan.org/pod/Net::API::REST</a>)<br>
<br>
Jacques<br>
</font><br>
<div class="moz-cite-prefix">On 2022/04/21 23:27, John Dunlap wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAC5eUSsWe+eTzngK+Eq3g0VNbrce_0ymY++GiQyJ2G6TUhvt0w@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">I sent this 8 years ago but, at the time, no one
was interested.<br>
<div>
<div><img src="cid:part1.6QPKx0uJ.SA4BKKlc@deguest.jp"
alt="image.png" class="" width="566" height="162"></div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Apr 21, 2022 at 9:40
AM John Dunlap <<a href="mailto:John@lariat.co"
moz-do-not-send="true" \
class="moz-txt-link-freetext">John@lariat.co</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">I ended up writing something custom to do that.<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Apr 20, 2022 at
11:22 PM Henrik S <<a
href="mailto:henrik@tomatoservers.com" target="_blank"
moz-do-not-send="true" \
class="moz-txt-link-freetext">henrik@tomatoservers.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">given the sample url:<br>
<br>
/api/user/id<br>
<br>
the part of "/api/user" is fixed. and there is a handler
setup for this <br>
path.<br>
<br>
how to get the id part in mod_perl?<br>
<br>
in other framework I could get it with the similar format:<br>
<br>
/api/user/:id<br>
<br>
puts "hallo #{id}"<br>
<br>
<br>
Thank you.<br>
</blockquote>
</div>
<br clear="all">
<br>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div style="font-size:small;font-family:arial"><span
style="color:rgb(68,68,68);font-family:"trebuchet
ms",sans-serif;font-size:large">John Dunlap</span><br>
</div>
<div style="font-size:small;font-family:arial"><i
style="font-family:"trebuchet
ms",sans-serif"><span
style="color:rgb(153,153,153);font-family:tahoma,sans-serif;font-style:normal">CTO
| </span><span
style="font-family:tahoma,sans-serif;font-style:normal"><font
color="#ff9900">Lariat</font></span><span
style="color:rgb(153,153,153);font-family:tahoma,sans-serif;font-style:normal"> \
</span></i><br> </div>
<div style="font-size:small;font-family:arial"><i
style="font-family:"trebuchet
ms",sans-serif"><span
style="color:rgb(153,153,153);font-family:tahoma,sans-serif;font-style:normal"><br>
</span></i></div>
<div style="font-size:small;font-family:arial"><i
style="font-family:"trebuchet
ms",sans-serif"><span
style="color:rgb(153,153,153);font-family:tahoma,sans-serif;font-style:normal"><b>Direct:</b></span></i></div>
<div style="font-size:small;font-family:arial"><i
style="font-family:"trebuchet
ms",sans-serif"><span
style="color:rgb(153,153,153);font-family:tahoma,sans-serif;font-style:normal"><a
href="mailto:john@lariat.co"
style="color:rgb(17,85,204)" target="_blank"
moz-do-not-send="true"
\
class="moz-txt-link-freetext">john@lariat.co</a></span></i></div> <div \
style="font-size:small;font-family:arial"><i style="font-family:"trebuchet
ms",sans-serif"><span
style="color:rgb(153,153,153);font-family:tahoma,sans-serif;font-style:normal"><br>
<b>Customer Service:</b></span></i></div>
<div style="font-size:small;font-family:arial"><span
style="color:rgb(153,153,153);font-family:arial,helvetica,sans-serif"><a
value="+18772686667" style="color:rgb(17,85,204)"
moz-do-not-send="true">877.268.6667</a></span></div>
<div style="font-size:small;font-family:arial"><span
style="color:rgb(153,153,153);font-family:arial,helvetica,sans-serif"><a
href="mailto:support@lariat.co"
style="color:rgb(17,85,204)" target="_blank"
moz-do-not-send="true" \
class="moz-txt-link-freetext">support@lariat.co</a></span></div> <div \
style="font-size:small;font-family:arial"><img \
src="cid:part2.Ek8sQuj3.BQeXHFPb@deguest.jp" class="" width="100" height="60"></div>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<br>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div style="font-size:small;font-family:arial"><span
style="color:rgb(68,68,68);font-family:"trebuchet
ms",sans-serif;font-size:large">John Dunlap</span><br>
</div>
<div style="font-size:small;font-family:arial"><i
style="font-family:"trebuchet ms",sans-serif"><span
style="color:rgb(153,153,153);font-family:tahoma,sans-serif;font-style:normal">CTO
| </span><span
style="font-family:tahoma,sans-serif;font-style:normal"><font
color="#ff9900">Lariat</font></span><span
style="color:rgb(153,153,153);font-family:tahoma,sans-serif;font-style:normal"> \
</span></i><br> </div>
<div style="font-size:small;font-family:arial"><i
style="font-family:"trebuchet ms",sans-serif"><span
style="color:rgb(153,153,153);font-family:tahoma,sans-serif;font-style:normal"><br>
</span></i></div>
<div style="font-size:small;font-family:arial"><i
style="font-family:"trebuchet ms",sans-serif"><span
style="color:rgb(153,153,153);font-family:tahoma,sans-serif;font-style:normal"><b>Direct:</b></span></i></div>
<div style="font-size:small;font-family:arial"><i
style="font-family:"trebuchet ms",sans-serif"><span
style="color:rgb(153,153,153);font-family:tahoma,sans-serif;font-style:normal"><a
href="mailto:john@lariat.co"
style="color:rgb(17,85,204)" target="_blank"
moz-do-not-send="true" \
class="moz-txt-link-freetext">john@lariat.co</a></span></i></div> <div \
style="font-size:small;font-family:arial"><i
style="font-family:"trebuchet ms",sans-serif"><span
style="color:rgb(153,153,153);font-family:tahoma,sans-serif;font-style:normal"><br>
<b>Customer Service:</b></span></i></div>
<div style="font-size:small;font-family:arial"><span
style="color:rgb(153,153,153);font-family:arial,helvetica,sans-serif"><a
value="+18772686667" style="color:rgb(17,85,204)"
moz-do-not-send="true">877.268.6667</a></span></div>
<div style="font-size:small;font-family:arial"><span
style="color:rgb(153,153,153);font-family:arial,helvetica,sans-serif"><a
href="mailto:support@lariat.co"
style="color:rgb(17,85,204)" target="_blank"
moz-do-not-send="true" \
class="moz-txt-link-freetext">support@lariat.co</a></span></div> <div \
style="font-size:small;font-family:arial"><img \
src="cid:part2.Ek8sQuj3.BQeXHFPb@deguest.jp" class="" width="100" height="60"></div>
</div>
</div>
</blockquote>
<br>
</body>
</html>
["image.png" (image/png)]
["100x60.png" (image/png)]
--------------26HxeS5p0fBloOZjD3r8Cj2W--
["OpenPGP_0x5F3C0261CDB2E752.asc" (application/pgp-keys)]
["OpenPGP_signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic