Questions tagged [vibed]

vibe.d is an async i/o and web programming framework for D.

vibe.d is an async i/o and web programming framework for D. http://vibed.org/

70 questions
0
votes
1 answer

What is the difference between registerWebInterface and registerRestInterface and RestInterfaceClient?

I can't understand by docs what is the difference between registerRestInterface, registerWebInterface and RestInterfaceClient. Both of them can generate methods by class. But I can't understand when I should use one and when another.
Dmitry Bubnenkov
  • 9,415
  • 19
  • 85
  • 145
0
votes
1 answer

Should Users be class or arrays of structures?

I can't understand if I am doing code in right way. I have vibed application. Code inside main: User user = new User(database); user.getUserByName("admin"); User Class: class User { string login; string password; //.... void…
Dmitry Bubnenkov
  • 9,415
  • 19
  • 85
  • 145
0
votes
3 answers

how to upload a file in vibe.d using the web framework

I am still new to Vibe.d so forgive me if I am missing something obvious. I want to upload a file in Vibe.d using the web framework. However, all the examples I find, including the one in the book 'D Web Development', are not using the web…
0
votes
1 answer

Can't build vibed: dmd failed with exit code 255

I am trying to build vibed app of VPS. And I am getting error: dmd failed with exit code 255. Here is full log: Compiling source/app.d... Compiling source/dbconnect.d... Compiling source/draft/database/collection.d... Compiling…
Dmitry Bubnenkov
  • 9,415
  • 19
  • 85
  • 145
0
votes
1 answer

Can I dispatch Fibers over a threadPool in D

What I want is to gain the Fiber's high efficiency on context switching and yield CPU time during I/O, but when the workload is enough to feed more CPUs I would like to gain the performance from the fact of do things in parallel. I read this great…
0
votes
1 answer

vibed: Writing past end of output stream

I can't understand why I am getting error: on next code: void logout(HTTPServerRequest req, HTTPServerResponse res) { try { logInfo("Logout section"); Json request = req.json; Json responseBody = Json.emptyObject; //…
Dmitry Bubnenkov
  • 9,415
  • 19
  • 85
  • 145
0
votes
1 answer

ArangoDB: name must be non-empty

When I open page in browser I am getting: {"id":"786938997027","name":"users","isSystem":false,"status":3,"type":2,"error":false,"code":200} When I am sending request from code, I am getting next output: Response:…
Dmitry Bubnenkov
  • 9,415
  • 19
  • 85
  • 145
0
votes
2 answers

vibed: How can I handle POST request?

Could anybody help me to handle POST request, I read docs, but it's not clear to me, how to handle POST request, that I send from page, to vibed server. I wrote next code: import vibe.d; import std.stdio; void main() { auto router = new…
Dmitry Bubnenkov
  • 9,415
  • 19
  • 85
  • 145
0
votes
2 answers

D case insensitive associative array?

Is it possible? I'm building a REST Api with vibe.d and implementing token authentication. Because I'm not aware in which casing the user will send me Authorization header parameter, I need to query it in case insensitive manner. For…
Davita
  • 8,928
  • 14
  • 67
  • 119
-4
votes
1 answer

What is the best way to get access to nested JSON in D?

Now I am using vibed JSON module, but I do not know how to get access to nested elements without iteration it with foreach. Here is my JSON: { "hasMore": false, "result": [{ "ip": "127.0.0.1", "passedtests":…
Dmitry Bubnenkov
  • 9,415
  • 19
  • 85
  • 145
1 2 3 4
5