fabriciocolombo / delphi-rest-client-api

A Delphi REST client API to consume REST services written in any programming language.
Apache License 2.0
380 stars 182 forks source link

2 fixes which I need: E2506 from Delphi 2010 compiler, Indy makes up useless authentication data. #34

Closed simar0at closed 9 years ago

simar0at commented 9 years ago

Doesn't compile in Delphi 2010 anymore. Using RestJsonUtils from SuperObject even in the implementation section breaks D2010's Generics leading to a E2506 pointing to RestJsonGenerics: Result := ctx.AsType(SuperObject.SO(text)); One can't supply (basic) authentication data by SetHeaders in a way that would survive a 40x error from the server using the Indy implementation. Indy tries to use it's user name and password fields to construct an authentication object to retry the connection and stores that. This data supersedes every authentication header set by SetHeaders if it exists. As user name and password are both '' a (hopefully) invalid basic auth header is sent instead of the one supllied with SetHeaders.

RobertoSchneiders commented 9 years ago

Would be better send a pull request only with your changes. Your master is ahead in some commits and these commits were not merged yet (open pull requests). You can create a separate branch and sends the pull request from there.

Seems that you have merged from cadena-monde. Unfortunately this repository has some commits in PT-Br (It was my mistake). I think it's not a good idea merge these commits here. You can solve this using my repository, the code base is exactly the same, but I fixed the commit messages.

Note: Master branch of my repository is also ahead of this repository due to a open pull requests

RobertoSchneiders commented 9 years ago

Now I have merge permissions on this repository. I will start to merge/close all pull requests.

As I commented before, will be better send only your changes.