Restsharp: Why RestClient must contain a value for BaseUrl

Created on 31 Oct 2015  路  5Comments  路  Source: restsharp/RestSharp

I think somesone and me not want to set "BaseUrl" because multi difference url in one site;

feature-request inquiry

Most helpful comment

This is really inconvenient. Enough so that I am considering just going with HttpClient.

All 5 comments

If you can provide a valid use case for not requiring a base url on the client I'll see what I can do. No promises. Also, just to make sure it's clear, this may or may not be possible without heavy changes I haven't looked yet so if it will require a big change than it will most likely not happen for a while if at all.

A valid use case could be that we are calling multiple APIs where one of them have only one endpoint. There is a workaround of course, but it would be nice if we could just pass single URL instead of splitting that single URL to base URL and relative URL.

Duplicate of #625

This is really inconvenient. Enough so that I am considering just going with HttpClient.

A valid usecase is that you can have a cookie for a top level domain and have to use the cookie in different subdomains. I want to use restsharp client's cookiecontainer ofc.

I ended up changing the baseurl every time instead of just creating requests with different urls as needed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexanderSchoenfeld picture AlexanderSchoenfeld  路  3Comments

nilesh-shah picture nilesh-shah  路  6Comments

nilsga picture nilsga  路  5Comments

mjwsteenbergen picture mjwsteenbergen  路  5Comments

abishekrsrikaanth picture abishekrsrikaanth  路  3Comments