Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 21:20
    alexeyzimarev commented #1413
  • 20:44
    alexeyzimarev commented #1300
  • 18:17
    ronaldfeb commented #1300
  • 16:05
    alexeyzimarev commented #1413
  • 16:00
    varnk commented #1413
  • 15:34
    alexeyzimarev commented #1413
  • 15:32
    varnk commented #1413
  • 07:15
    alexeyzimarev commented #1413
  • 07:15
    alexeyzimarev commented #1413
  • Jan 21 22:16
    varnk opened #1413
  • Jan 21 12:13
    Petkoski starred restsharp/RestSharp
  • Jan 21 11:42
    OleksandrBorovenskyi starred restsharp/RestSharp
  • Jan 21 03:01
    vslee starred restsharp/RestSharp
  • Jan 20 20:18
    jz5 opened #1412
  • Jan 20 11:48
    partyz0ne synchronize #1411
  • Jan 20 11:47
    bchewy starred restsharp/RestSharp
  • Jan 20 09:00
  • Jan 20 08:08
    partyz0ne edited #1411
  • Jan 20 08:05
    partyz0ne review_requested #1411
  • Jan 20 08:03
    partyz0ne opened #1411
Ricky Curtice
@kf6kjg
I could if I find time. Turns out the latest version of HttpClient does the same thing.
Alexey Zimarev
@alexeyzimarev
yeah, I have seen your comment. It seems like this is how .NET wants it to be
Wesley Egberto
@wesleyegberto
Hi All!
Is there any builder to help make request streight forward?
Like: await RestClientBuilder.Create("httt://base.com").Path(myId).GetAsync().GetEntity<MyModel>() ?
Antoon Verroken
@AntoonVerroken_twitter
I have seen in the RestSharp issues there are some issues related with File upload that is open...
Would this have to do with the current issues?
Antoon Verroken
@AntoonVerroken_twitter
Hi, is someone online?
Regards,
Alexey Zimarev
@alexeyzimarev
@wesleyegberto no, there is no builder
Ricky
@rickyyweng
Hello, so Im currently trying to send a GET request with restsharp and it's suppose to redirect to another URL but that doesn't happen. It just seems to stay at the same URL that I put into the request
xiaohaoWit
@xiaohaoWit
hello
RestSharp whether support or not https?
Alexey Zimarev
@alexeyzimarev
What is supported by .NET is supported by RestSharp
Of course we support https
@rickyyweng I think it would make sense for you to ask on StackOverflow since there you’ll find more people that use RestSharp
Paweł Iżycki
@pizycki
Hello, does any RestSharp version work with NET Standard 1.1?
I'm interested in this particular version as I may need to support .NET Framework starting from 4.5 up to the newest version.
Ivan Temchenko
@35359595
Hi, is it possible to ignore SSL/TLS errors with RestSharp execute?
oh, ServerCertificateValidationCallback works just fine =)
xiaohaoWit
@xiaohaoWit
Thank you for your reply!
Maksim Kislyakov
@Gradi
Hello everyone. Does RestSharp always set Connection: keep-alive header or i have to manually set it every time i make request? Second question is How can i set http version?
itadder
@itadder
hello
so I would add enduser as a parmeter
in the request and it value would some Foo@example.com
itadder
@itadder
hi
anyone around
Inojin
@Inojin
hi
Alexander
@MalveiraAlexander
support uwp?
Alexey Zimarev
@alexeyzimarev
@pizycki RestSharp supports .NET Framework 4.5.2 and .NET Standard 2.0, just like it is shown in the nuget package page
@Gradi you can use client.AddDefaultHeader to set any header to be sent for each request that is executed by that client
@MalveiraAlexander not sure what are you trying to say/ask
Petter Vegsund Brodin
@g2petter
We've been having some permission problems with adding files to an IRestRequest using the AddFile(string name, string path, string contentType = null) method, and I think maybe there's an issue with the FileStream that's being used.
The method reads like this:
        public IRestRequest AddFile(string name, string path, string contentType = null)
        {
            var f = new FileInfo(path);
            var fileLength = f.Length;

            return AddFile(new FileParameter
            {
                Name = name,
                FileName = Path.GetFileName(path),
                ContentLength = fileLength,
                Writer = s =>
                {
                    using (var file = new StreamReader(new FileStream(path, FileMode.Open)))
                    {
                        file.BaseStream.CopyTo(s);
                    }
                },
                ContentType = contentType
            });
        }

I wonder if this FileStream constructor actually requires both read and write permissions:

new FileStream(path, FileMode.Open)

I think that in order to only request read access (which I assume should be enough for the purpose of adding a file to a request) you need to call this constructor instead:

new FileStream(path, FileMode.Open, FileAccess.Read)

Petter Vegsund Brodin
@g2petter
@alexeyzimarev , didn't know I'd find you here! :)
Alexey Zimarev
@alexeyzimarev
Haha
You can’t escape
You know that you can use an overload of AddFile that accepts the stream reading delegate?
Petter Vegsund Brodin
@g2petter
I realized when looking into it after I posted it, so I'll be doing that now
Alexey Zimarev
@alexeyzimarev
If you think we ask for too broad permissions for the file, open an issue on github please
Better submit a PR :smile:
Petter Vegsund Brodin
@g2petter
I thought it might be good to check if it's intentional or not. There might be a reason that I'm not seeing for why you'd require write permissions as well.
pornstache321
@pornstache321
restsharp seems to clean up urls automatically... how the fuck do i make it not do that. For example, working with a weird api that has a query string like this: 1m3434&1d34534&2m4353 etc. No values, only keys in the query string. Restsharp just gets rid of the keys all together
thorthumb00
@thorthumb00
Hi all. Can anyone recommend a restsharp code example that implements a search function?
Daan De Lombaert
@DaanDL
Does anybody know how one can send a "Date" header in a custom format?
I'm having trouble with it because "Date" is a restricted header and it gets overwritten internally
kikootwo
@kikootwo
I googled for quite a while but couldn't find an answer. Is there a way to ignore properties for json serialization using default serialization with restsharp?
Ivan Temchenko
@35359595
@kikootwo is [JsonIgnore] attribute on target property is sufficient for you?
kikootwo
@kikootwo
That doesn't appear to be present without newtonsoft. But I just tested and it seems that even if I supply additional properties in the json it isn't carrying over to the service side, so I'm good! Thanks!
kikootwo
@kikootwo
Another odd issue, each time I restart my application that is using my API written with restsharp the put/delete/post request that I make takes like 15 seconds, after that they take 200ms until I restart the application again. Any ideas?