title: Code=-1011 "Request failed: unauthorized (401)" AFNetwoking
body: <p>I'm trying to make a GET request setting a header called </p>
  
  <blockquote>
    <p>X-User-Authorization 
     but I'm getting the following error: </p>
    
    <p>Code=-1011 "Request failed: unauthorized (401)" AFNetwoking</p>
  </blockquote>
  
  <pre><code> -(void) listarGruposDeDistancia
      {
          NSMutableArray *listaDistancias = [[NSMutableArray alloc]init];
          AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
          manager.requestSerializer = [AFHTTPRequestSerializer serializer];
          manager.requestSerializer.allowsCellularAccess = YES;
          [manager.requestSerializer setValue:@"valueHere" forHTTPHeaderField:@"X-User-Authorization"];
  
         AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone];
          policy.allowInvalidCertificates = YES;
          manager.securityPolicy = policy;
  
          NSString *url = @"https://url:3000/api/v0.1/groups/";
  
          [manager GET:url
            parameters:nil
               success:^(AFHTTPRequestOperation *operation, id responseObject) {
  
                  NSLog(@“success”);
                   }
                   [self concluirListaDistancias:listaDistancias];
  
               } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
                   NSLog(@"Error: %@", error);
               }];
      }
  </code></pre>