Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18832] iOS: Implement NSURLSessionConfiguration to support HTTPAdditionalHeaders

GitHub Issuen/a
TypeNew Feature
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterEduardo Gomez
AssigneeUnknown
Created2015-04-15T17:27:28.000+0000
Updated2019-11-07T00:39:23.000+0000

Description

Feature Request

Provide support to add a dictionary of [additional headers](https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLSessionConfiguration_class/index.html#//apple_ref/occ/instp/NSURLSessionConfiguration/HTTPAdditionalHeaders) to send with requests. In native iOS, NSURLSessionConfiguration is a class that allows you to configure your NSURLSession with connection/HTTP policies, caching behavior, maximum number of connections, custom headers, etc. For example, if you have a scenario where an authentication token is required to be passed in header on every call to a RESTful API, you can set the token in the session configuration and it will apply to all requests made using that session.

Comments

  1. Hans Knöchel 2016-05-22

    We can set HTTP headers by using [setRequestHeader](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Network.HTTPClient-method-setRequestHeader) which should be exactly what this is about.

JSON Source