AFNetworking 2.0 add headers to GET request

后端 未结 7 1116
天命终不由人
天命终不由人 2020-12-07 12:20

I\'ve just started using AFNetworking 2.0 and I was wondering how I put in headers into a HTTP Get request. The documentation sets up a GET like this:

AFHTTP         


        
7条回答
  •  情书的邮戳
    2020-12-07 12:36

    Use the following code to put any type of header value:

    [[FRHTTPReqManager sharedManager].requestSerializer setValue:value forHTTPHeaderField:key];
    

提交回复
热议问题