Closed jchannon closed 8 years ago
I'd like to get a Content
property PR. The main problem is, that you have to get the correct character set for the response. This might or might not be available as HTTP header. Even when it's available, it might differ when you receive HTML(SGML) or XML content. It's difficult to get right and the conversion should only be done, when the content property gets accessed, to avoid unnecessary memory allocations.
My "solution" was to leverage all those problems to the user of the library, because the user knows best, how to handle the raw data.
https://github.com/restsharp/RestSharp/blob/e7c65df751427298cb59f5456bbf1f59967996be/RestSharp/RestResponse.cs#L74 Looks like the original restsharp was quite lazy in this.
On 10 May 2016 at 12:52, James Humphries notifications@github.com wrote:
https://github.com/restsharp/RestSharp/blob/master/RestSharp/RestResponse.cs#L74 Looks like the original restsharp was quite lazy in this.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/FubarDevelopment/restsharp.portable/issues/63#issuecomment-218135297
Seems to do some detection? Could it be "borrowed" ? 😄
Yes, I guess it could :wink: . Do you want to try making a PR, or should I do this? However, I cannot do this now, as I'm quite busy this week.
I can do it in an hour or so.
Do you have a release schedule and if so when would it make it into a release?
Thanks
On 10 May 2016 at 13:02, Mark Junker notifications@github.com wrote:
Yes, I guess it could [image: :wink:] . Do you want to try making a PR, or should I do this? However, I cannot do this now, as I'm quite busy this week.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/FubarDevelopment/restsharp.portable/issues/63#issuecomment-218137165
I guess, that I'm able to release the new version by tomorrow or the day after tomorrow.
@fubar-coder I added a PR #65
Thank you
Can you test this new release? Please close this issue when everything works as expected.
Will do! Thanks
On Friday, 13 May 2016, Mark Junker notifications@github.com wrote:
Can you test this new release? Please close this issue when everything works as expected.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/FubarDevelopment/restsharp.portable/issues/63#issuecomment-219025606
Sorry to be a pain, Restsharp has a Content property but this lib doesnt, I can only see RawBytes. Is it possible to retrieve a string representation of the body anyway? I see you have some HttpContent extensions marked as internal in the codebase, would a extension to get this out be an idea for a PR?