0

I have following code in my .net app.

MessageHeader<string> mhg = new MessageHeader<string>(SomeTicket);
     MessageHeader header = mhg.GetUntypedHeader("MessageName", "Namespace");
     OperationContext.Current.OutgoingMessageHeaders.Add(header);

So i want to put the same message header from ios app by using NSMutableUrlRequest class, how to implement the same functionality from ios?

taffarel
  • 4,015
  • 4
  • 33
  • 61

1 Answers1

0

You can use following instance methods of NSMutableURLRequest class. If you use first one, you have to pass dictionary with key-value pairs that you want to send in request headers. If you use second one, you can directly add headers one by one.

- (void)setAllHTTPHeaderFields:(NSDictionary *)headerFields

- (void)addValue:(NSString *)value forHTTPHeaderField:(NSString *)field

For more details read documentation

Björn Kaiser
  • 9,882
  • 4
  • 37
  • 57
Rahul Wakade
  • 4,765
  • 2
  • 23
  • 25