djmnz / RestFluencing

MIT License
11 stars 4 forks source link

Missing headers and http methods #10

Closed jmcgowan85cc closed 5 years ago

jmcgowan85cc commented 5 years ago

Hi,

Firstly, thanks for all the work in your framework.

A few minor issues I've noted to improve your service:

Thanks again!

djmnz commented 5 years ago

Thanks the feedback @jmcgowan85cc

HTTP Methods We haven't implemented all the helpers for every verb, however our enum has most of the available verbs.

The helper for patch exists on the static reference but not as an extension of the configuration instance :( I will add that.

If the helper doesn't exist you can still call the generic helper:

_configuration.Prepare(HttpVerb.Patch, "/path")

Or against the static

_configuration.Prepare(HttpVerb.Patch, "/path")

Meanwhile you can create your own extension in your solution if you prefer to

UseDefaultCredentials Unfortunately UseDefaultCredentials is not easily available on HttpClient. I don't want to complicate the current implementation by adding more hooks or customisations to it.

However, next release I am planning to allow you using your own HttpClient instance this may help you get to that position.

The easiest alternative at the moment is for you to create your own IApiClient implementation .

Headers Yep I will fix it :) Thanks for the feedback.

Logging I will look into it.

By the way, feel free to create Pull Requests with any changes you want and I can help you merge them in.

djmnz commented 5 years ago

I am closing this issue for now.

Version 1.0.0 is out, with the .net standard support, HttpClient reusuability and the Content.Headers fix.

var config = new RestConfiguration();
var client = new HttpClient();
config.UsingWebApiClient(client);

If this doesn't help, then I suggest you create an new issue in regards to the UseDefaultCredentials with a working example of an HttpClient request so we can discuss further.