On Friday, 15 December 2023 at 07:36:04 UTC, aj_dlang wrote:
does it active?
If you mean if that vibe-d forum is still active, I don't know. I
tried to register, but I never got a confirmation mail... so
probably not.
On the other hand, there wasn't a response to my question on this
board ei
On Saturday, 2 December 2023 at 12:39:01 UTC, bomat wrote:
On Friday, 1 December 2023 at 19:18:19 UTC, bomat wrote:
So my question is, is it possible to have vibe-d parse the
request body into a struct "implicitly"?
I'm gonna answer my own question here, it's `@bodyParam`.
https://forum.reject
On Friday, 1 December 2023 at 19:18:19 UTC, bomat wrote:
So my question is, is it possible to have vibe-d parse the
request body into a struct "implicitly"?
I'm gonna answer my own question here, it's `@bodyParam`.
https://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/40001/
h
Hey everyone,
I'm looking into vibe-d, particularly how to build a REST API
server.
Given this struct:
```
struct Project
{
string project_id;
string name;
}
```
I could write a GETter like this:
```
@path("projects/:project_id")
Project getProject(string _project_id);
I need to use gcloud NLP api which has the url and endpoint like
this
"https://language.googleapis.com/v1beta2/documents:analyzeSentiment";. The ":" between documents and analyzeSentiment make a lot trouble for me. Just don't know how to setup the @path in RestInterface for such endpoint. I tried
https://forum.dlang.org/post/bctojiyzicxaueqgm...@forum.dlang.org
On Wednesday, 15 March 2017 at 13:24:07 UTC, NX wrote:
I'm trying to understand how to create some json-rest api that
would return data (in json format) related to that specific
logged in user. I see the documentation c
have problems, but if you've verified all of
your code and marked it as @trusted, then the compiler can check the rest of
your code, and if there _is_ a memory corruption problem, you know where to
look - any @trusted code and then any libraries you're using. But if you
just give up and le
On Tuesday, 10 July 2018 at 13:24:43 UTC, WebFreak001 wrote:
It's supposed to make webservers safe and not crash because of
segmentation faults, etc.
If you still want to write code like you are used to and don't
care about that in your webserver, just mark everything in the
implementation @t
On Tuesday, 10 July 2018 07:24:43 MDT WebFreak001 via Digitalmars-d-learn
wrote:
> On Tuesday, 10 July 2018 at 13:14:24 UTC, Piotr Mitana wrote:
> > Hello,
> >
> > I've recently started building a little REST application on
> > vibe.d. I decided to use the
On Tuesday, 10 July 2018 at 13:14:24 UTC, Piotr Mitana wrote:
Hello,
I've recently started building a little REST application on
vibe.d. I decided to use the "database" library, as I need to
communicate with the PostgreSQL instance.
During the compilation I see the deprecatio
Hello,
I've recently started building a little REST application on
vibe.d. I decided to use the "database" library, as I need to
communicate with the PostgreSQL instance.
During the compilation I see the deprecation warning:
"Non-@safe methods are deprecated in REST
On Saturday, 3 March 2018 at 02:32:11 UTC, Mario wrote:
So I've been learning D since the day 11 (I posted for first
time here) and now I've decided to try Vibe.D to make my
company API.
The fact is that I've achieved to do it (according to the
provided code) and it works! But it shows a defa
On Saturday, 3 March 2018 at 02:32:11 UTC, Mario wrote:
So I've been learning D since the day 11 (I posted for first
time here) and now I've decided to try Vibe.D to make my
company API.
The fact is that I've achieved to do it (according to the
provided code) and it works! But it shows a defa
So I've been learning D since the day 11 (I posted for first time
here) and now I've decided to try Vibe.D to make my company API.
The fact is that I've achieved to do it (according to the
provided code) and it works! But it shows a default message and
on the startup. So I'd like to know how c
index() { ... }
}
auto myI = new MyInterfaceImpl;
router.registerRestInterface(myI);
router.get("/route/to/getPage", &myI.getPage);
router.get("/route/to/index", &myI.index);
This worked for me, but note that my "non-rest" function was
static, so I didn't
an interface to that the rest interface would
actually compile, the web interface is routed before the rest
interface and so the rest interface would never be reached
since the methods are all the same and the REST's are shadowed
by the web's .
Makes me wonder whether or not vibe
On Wednesday, 7 February 2018 at 20:23:10 UTC, Nicholas Wilson
wrote:
On Wednesday, 7 February 2018 at 19:50:31 UTC, Jacob Carlborg
wrote:
Have you tried this?
No. But apart from the fact that I forgot to make the class
inherit from an interface to that the rest interface would
actually
On Wednesday, 7 February 2018 at 19:50:31 UTC, Jacob Carlborg
wrote:
Have you tried this?
No. But apart from the fact that I forgot to make the class
inherit from an interface to that the rest interface would
actually compile, the web interface is routed before the rest
interface and so the
SomeData[] items;
// Get
void index()
{
render!("index.dt");
}
// Get
void getPage()
{
render!("page.dt", items);
}
// REST -> receive d as JSON.
void postGiveMeData(SomeData d)
{
sync
On Wednesday, 7 February 2018 at 18:38:15 UTC, Seb wrote:
How about using the normal Vibe.d Web Service?
Stupid question: whats the difference?
An example from my WIP project vibe-by-example project:
https://github.com/wilzbach/vibe-d-by-example/blob/master/web/service.d
I also have a for
SomeData[] items;
// Get
void index()
{
render!("index.dt");
}
// Get
void getPage()
{
render!("page.dt", items);
}
// REST -> receive d as JSON.
void postGiveMeData(SomeData d)
{
sync
}
class MyInterface
{
SomeData[] items;
// Get
void index()
{
render!("index.dt");
}
// Get
void getPage()
{
render!("page.dt", items);
}
// REST -> receive d as JSON.
void postGiveMeData(SomeData d)
{
sy
doesn't
provide a way to distinguish between REST and not.
I'm also not sure it is necessary, you can certainly have
multiple class which provide REST and Web endpoints. You can
even dynamically build routes within a route.
Hmm, this might be one of the few use cases for nested classe
On Wednesday, 7 February 2018 at 17:04:13 UTC, Nicholas Wilson
wrote:
Is it possible to have some urls routed to serve content and
some to receive JSON in the same class?
This seems unlikely to me, the function signature doesn't provide
a way to distinguish between REST and not.
I
{
render!("index.dt");
}
// Get
void getPage()
{
render!("page.dt", items);
}
// REST -> receive d as JSON.
void postGiveMeData(SomeData d)
{
synchronized
{
items ~= d;
}
}
}
Thank you for explanation.
It fix my problem with compilation. I was using
https://github.com/rejectedsoftware/vibe.d/blob/master/examples/web-auth/source/app.d as example and there is @safe function. I try to compile it with newest (beta) version of vibe.d and it compiled too (so i suspect in n
On Sunday, 6 August 2017 at 16:47:14 UTC, holo wrote:
Hello
I'm trying to use auth framework with REST api (
http://vibed.org/api/vibe.web.auth/ ).
Is it possible to use it with registerRestInterface? According
to description under:
http://vibed.org/api/vibe.web.auth/requiresAuth it s
Hello
I'm trying to use auth framework with REST api (
http://vibed.org/api/vibe.web.auth/ ).
Is it possible to use it with registerRestInterface? According to
description under:
http://vibed.org/api/vibe.web.auth/requiresAuth it should be
available on both Web and REST.
Here
I had post question here
http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/43511/
@rootPathFromName
interface API
{
@path("mytrack") @method(HTTPMethod.GET)Json
doTrackSpeedAnalyze(int trackid, string startDateTime, string
endDateTime);
}
class MyRouter : API
{
Config config;
Database database;
this(Config config, Database database)
{
this.
I wrote next code:
void foo(string _error = null)
{
writeln("Error");
}
override:
@errorDisplay!foo
Json doTrackSpeedAnalyze(int trackid, string
startDateTime, string endDateTime) //
/api/mytrack?trackid=123&startDateTime=2000&endDateTime=
On Monday, 29 May 2017 at 12:23:59 UTC, Suliman wrote:
I am doing REST interface with vibed. And thinking about
handling errors, if users forgot to pass all expected args in
function.
For example:
foo(int x, int y) // get request
{
}
/api/foo?x=111
And if user is forgot to pass `y` we will
On Monday, 29 May 2017 at 12:23:59 UTC, Suliman wrote:
I am doing REST interface with vibed. And thinking about
handling errors, if users forgot to pass all expected args in
function.
For example:
foo(int x, int y) // get request
{
}
/api/foo?x=111
And if user is forgot to pass `y` we will
I am doing REST interface with vibed. And thinking about handling
errors, if users forgot to pass all expected args in function.
For example:
foo(int x, int y) // get request
{
}
/api/foo?x=111
And if user is forgot to pass `y` we will get error in the
browser. What is the right way to
On 03/15/2017 07:06 AM, Suliman wrote:
> You need to look at JWT.
WekaIO uses jwtd, with minor improvements on it (improved error handling
and code coverage):
https://github.com/weka-io/jwtd
Ali
On Wednesday, 15 March 2017 at 13:24:07 UTC, NX wrote:
I'm trying to understand how to create some json-rest api that
would return data (in json format) related to that specific
logged in user. I see the documentation covers these but I'm
totally new to vibe.d so can't quite fig
On Wednesday, 15 March 2017 at 13:24:07 UTC, NX wrote:
I'm trying to understand how to create some json-rest api that
would return data (in json format) related to that specific
logged in user. I see the documentation covers these but I'm
totally new to vibe.d so can't quite fig
I'm trying to understand how to create some json-rest api that
would return data (in json format) related to that specific
logged in user. I see the documentation covers these but I'm
totally new to vibe.d so can't quite figure out putting these two
things together and make
Hi
I have created a personal project that aims to learn myself more
about D/vibe.d and to create a simple and easy to grasp example
on Mongo -> Vibe -> Angular.
I have been thinking about the possibility of embedding D code in
diet templates, as for ex to set api urls. Right now the urls are
On Sunday, 19 July 2015 at 19:54:31 UTC, Jarl André Hübenthal
wrote:
Hi
I have created a personal project that aims to learn myself
more about D/vibe.d and to create a simple and easy to grasp
example on Mongo -> Vibe -> Angular.
Nice ! I'm also working on a project like this, using some pai
On Sunday, 19 July 2015 at 19:54:31 UTC, Jarl André Hübenthal
wrote:
Hi
I have created a personal project that aims to learn myself
more about D/vibe.d and to create a simple and easy to grasp
example on Mongo -> Vibe -> Angular.
[...]
Nice. I was thinking about doing one up in React but h
On Wednesday, 4 December 2013 at 09:09:56 UTC, qznc wrote:
On Sunday, 1 December 2013 at 18:37:25 UTC, guest wrote:
just wanted to know if something in my code is really bad or
could be solved in more elegant way. Basicly things which
people with more experience in D see on their first view of
On Sunday, 1 December 2013 at 18:37:25 UTC, guest wrote:
just wanted to know if something in my code is really bad or
could be solved in more elegant way. Basicly things which
people with more experience in D see on their first view of my
code.
The line splitting in HttpRequest can be simplif
just wanted to know if something in my code is really bad or
could be solved in more elegant way. Basicly things which people
with more experience in D see on their first view of my code.
On Sunday, 1 December 2013 at 18:24:58 UTC, guest wrote:
yes i have seen it.
But i wanted to try it out my self. And thought it's a good
project to learn D.
Well, you need to be a bit more precise about kind of feedback
you want to get than :) It is pretty large topic to talk about.
Have you seen vibe.d REST module? It does exactly that - abuses D
reflection for REStful HTTP API generation.
code -
https://github.com/rejectedsoftware/vibe.d/blob/master/source/vibe/http/rest.d
example -
https://github.com/rejectedsoftware/vibe.d/blob/master/examples/rest/source/app.d
yes i have seen it.
But i wanted to try it out my self. And thought it's a good
project to learn D.
Hi,
i just got some progress in my first D project and wanted to know
if i made
some basic mistakes and what could have been done in an more
elegant way.
I'm open for every advice i get.
The project is basicly a copy of javas jax-rs but in a very very
early state :).
I know my Httprequest an
48 matches
Mail list logo