BaseUrl is now manditory
See original GitHub issueIn previous versions of RestSharp, I could call the following:
var client = new RestClient();
var request = new RestRequest("https://server.com/api/file.json", Method.Post);
client.PostAsync(request, (response, handle) => { ... });
However, this now causes an ArgumentNullException at RestSharp\RestClient.cs line 258.
Is this an expected breaking change?
Issue Analytics
- State:
- Created 9 years ago
- Comments:16 (7 by maintainers)
Top Results From Across the Web
baseURL is required for instance request · Issue #2234
When using the request() method on an instance, the request throws an error if the instance's config has url specified, but not baseUrl...
Read more >baseURL not used in request url
1 Answer 1 · You need to ensure your .env setup has 'REACT_APP_BASE_URL' to work, if you don't have 'REACT_APP_' it won't work....
Read more >Base URL is not working properly
I've noticed in the config panel, when I switch from 'Default Config' to 'Main Website', this is what the base URL is listed...
Read more >The Document Base URL element - HTML - MDN Web Docs
The HTML element specifies the base URL to use for all relative URLs in a document. There can be only one element in...
Read more >Configuration | Cypress Documentation
While it's not strictly necessary for Cypress to parse your configuration, we recommend wrapping your config object ... baseUrl: 'http://localhost:1234',
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It seems there are no way to request an endpoint just by a full URL, though
RestClient
has empty contrustor, but any requests afterwards with absolute uris don’t work. You must split your URL into partials.Really unfriendly api.
Yes. The latest version converted the BaseUrl from a string to a URI and by doing so made it required to be set on the RestClient.