vadymmarkov / Malibu

:surfer: Malibu is a networking library built on promises
https://vadymmarkov.github.io
Other
414 stars 39 forks source link

Feature: Query content type #18

Closed vadymmarkov closed 8 years ago

vadymmarkov commented 8 years ago

@hyperoslo/malibu Apparently I realised that for GET, DELETE and HEAD requests we should not set "Content-Type" header, encode parameters and set request body. Instead of this we should build query from parameters and append it to URL. So this PR includes:

1) New content type Query for the case described above. 2) Message is simplified, now it's more like workaround to set default empty dictionaries to parameters and headers. 3) There are more convenience request protocols GETRequestable, POSTRequestable, etc, with default values for method, contentType, etagPolicy. 4) Now you can add your own NSURLSessionDelegate to Networking. 5) If you provide baseURLString in your Networking and don't set custom session delegate, we "trust" this server domain by default :smile: Got this challenge and think it's better to put it here instead of actual project.