tomkuijsten / restup

Webserver for universal windows platform (UWP) apps
MIT License
114 stars 48 forks source link

Get/put/post response interfaces not in nuget package #53

Closed WattsC-90 closed 8 years ago

WattsC-90 commented 8 years ago

Hi, followed the wiki, had a look through the examples in the repo for different controllers etc. I am seeing a lot of IPostResponse, IGetResponse etc, but these types dont exist in the nuget package, is this due for an update or are these only available from source at the moment?

WattsC-90 commented 8 years ago

Oh, but the library itself is totally awesome.. Thanks for providing it! Stopped me from crying in a corner when i found iot doesnt do wcf (yet)...

Jark commented 8 years ago

Hi,

Due to #46 the location of IGetResponse, etc. will have moved a bit so you might have to change the imports to the old location if you want to get the samples to work with the NuGet package.

I believe tom wants to do some work before creating a new NuGet package.

Any questions feel free to ask.

Cheers,

Jark

WattsC-90 commented 8 years ago

Thats fine! Thanks for the quick response, just wanted to make sure i was doing things the right way, got everything working as expected except the postresponse which only seems to work successfully in postman if i give it a redirect url rather than just a 201 response.. Maybe thats just postman being a pain though? The microsoft page on "making a post with webrequest" works no bother.. Any thoughts?

Jark commented 8 years ago

The http spec specifies that for http status code 201 (created) the location of the newly created resource should be specified.

I think postman simply adheres to the spec a bit stricter than the webrequest class. You could use fiddler to intercept the requests, but I don't know if that also works with postman.

Hope this helps :)

tomkuijsten commented 8 years ago

I have some time this week to get a new nugget package released, so that should fix this issue. Hold on... :)

Jark commented 8 years ago

Fixed in https://www.nuget.org/packages/Restup/1.0.0-beta3