[aerogear-dev] [iOS] AGHttpClient protocol
Christos Vasilakis
cvasilak at gmail.com
Thu Dec 13 07:58:02 EST 2012
agree that a protocol is needed instead of using a concrete impl.
+1
-
Christos
On Dec 13, 2012, at 1:54 PM, Matthias Wessendorf <matzew at apache.org> wrote:
> when we share the AG Sec. code - we need to pass in a concrete impl of
> the http client:
>
> https://github.com/aerogear/aerogear-ios/blob/master/AeroGear-iOS/AeroGear-iOS/security/AGRestAuthentication.m#L28
>
> So for the CoreDataPlugin, we need to change that, since there is no
> common "interface", see
>
> https://github.com/matzew/aerogear-store-ios/blob/security/AeroGear-Store/sec/AGRestAuthentication.m#L28
>
> -M
>
> On Thu, Dec 13, 2012 at 12:19 PM, Matthias Wessendorf <matzew at apache.org> wrote:
>> Hello,
>>
>> the CoreData plugin has its own HTTP client (since it's inheriting
>> from AFIncrementalStore API), but the "public" API of that own client
>> is similar to the one used on the Pipe IMPL:
>>
>> + (AGIncrementalStoreHttpClient *)clientFor:(NSURL *)baseURL;
>>
>> versus
>>
>> + (AGHttpClient *)clientFor:(NSURL *)url;
>>
>> Technically both HttpClients are extensions of the AFNetworking
>> HTTPClient. In order to reuse the same public API for different http
>> clients, I thought we could introduce a (public) protocol that allow
>> it to write type-safe HTTP clients.
>>
>> Any thoughts?
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
More information about the aerogear-dev
mailing list