digitalmars.D.learn - Debugging bad requests with vibe
- Nicholas Wilson (22/22) Feb 08 2018 I have set up a vibe.d rest interface (on a server) and have a
- Nicholas Wilson (4/26) Feb 08 2018 Never mind, it was because I was accidentally shadowing that path
- Nicholas Wilson (3/35) Feb 09 2018 Hmm, nope it wasn't that.
- Seb (3/5) Feb 09 2018 -v and -vv
- Nicholas Wilson (4/9) Feb 09 2018 All that gives me is a bunch of
- Nicholas Wilson (4/9) Feb 09 2018 So it turns out that structs do not work as parameters TO rest
- rjframe (10/21) Feb 09 2018 I have a project doing this; I think I solved that (or something) with:
I have set up a vibe.d rest interface (on a server) and have a client on my machine. struct Observation { string desc; DateTime time; } interface Obsever { property void observe(Observation ra); } void main() { auto test = Observation("a duck", cast(DateTime)Clock.currTime(UTC())); auto client = new RestInterfaceClient! Obsever("http://example.com/observation"); client. observe = test; // 400 } I' pretty sure the url is correct because other ones give 404. Is there a way I can see/log what requests are being made? I can change both the client and server.
Feb 08 2018
On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson wrote:I have set up a vibe.d rest interface (on a server) and have a client on my machine. struct Observation { string desc; DateTime time; } interface Obsever { property void observe(Observation ra); } void main() { auto test = Observation("a duck", cast(DateTime)Clock.currTime(UTC())); auto client = new RestInterfaceClient! Obsever("http://example.com/observation"); client. observe = test; // 400 } I' pretty sure the url is correct because other ones give 404. Is there a way I can see/log what requests are being made? I can change both the client and server.Never mind, it was because I was accidentally shadowing that path with a get on the server.
Feb 08 2018
On Thursday, 8 February 2018 at 20:24:19 UTC, Nicholas Wilson wrote:On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson wrote:Hmm, nope it wasn't that.I have set up a vibe.d rest interface (on a server) and have a client on my machine. struct Observation { string desc; DateTime time; } interface Obsever { property void observe(Observation ra); } void main() { auto test = Observation("a duck", cast(DateTime)Clock.currTime(UTC())); auto client = new RestInterfaceClient! Obsever("http://example.com/observation"); client. observe = test; // 400 } I' pretty sure the url is correct because other ones give 404. Is there a way I can see/log what requests are being made? I can change both the client and server.Never mind, it was because I was accidentally shadowing that path with a get on the server.
Feb 09 2018
On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson wrote:Is there a way I can see/log what requests are being made? I can change both the client and server.-v and -vv
Feb 09 2018
On Friday, 9 February 2018 at 08:06:53 UTC, Seb wrote:On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson wrote:All that gives me is a bunch of [FAC3BFF6:FAC451F6 dia] Actively closing TCP connection is there a way to get the JSON being sent?Is there a way I can see/log what requests are being made? I can change both the client and server.-v and -vv
Feb 09 2018
On Friday, 9 February 2018 at 11:46:31 UTC, Nicholas Wilson wrote:On Friday, 9 February 2018 at 08:06:53 UTC, Seb wrote:Wireshark?On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson wrote:All that gives me is a bunch of [FAC3BFF6:FAC451F6 dia] Actively closing TCP connection is there a way to get the JSON being sent?Is there a way I can see/log what requests are being made? I can change both the client and server.-v and -vv
Feb 09 2018
On Friday, 9 February 2018 at 11:46:31 UTC, Nicholas Wilson wrote:On Friday, 9 February 2018 at 08:06:53 UTC, Seb wrote:Try Fiddler, great tool tooOn Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson wrote:All that gives me is a bunch of [FAC3BFF6:FAC451F6 dia] Actively closing TCP connection is there a way to get the JSON being sent?Is there a way I can see/log what requests are being made? I can change both the client and server.-v and -vv
Feb 09 2018
On Friday, 9 February 2018 at 08:06:53 UTC, Seb wrote:On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson wrote:So it turns out that structs do not work as parameters TO rest interface functions. https://github.com/vibe-d/vibe.d/issues/2067Is there a way I can see/log what requests are being made? I can change both the client and server.-v and -vv
Feb 09 2018
On Fri, 09 Feb 2018 15:48:54 +0000, Nicholas Wilson wrote:On Friday, 9 February 2018 at 08:06:53 UTC, Seb wrote:I have a project doing this; I think I solved that (or something) with: ``` path("/api/") interface RestAPI { // stuff } ``` I cannot reproduce your problem with that code though to see if it will work.On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson wrote:So it turns out that structs do not work as parameters TO rest interface functions. https://github.com/vibe-d/vibe.d/issues/2067Is there a way I can see/log what requests are being made? I can change both the client and server.-v and -vv
Feb 09 2018