소스 검색

Update `extension URLRequest` method in Document (#3573)

Huang-Libo 3 년 전
부모
커밋
5f44031549
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      Documentation/Usage.md

+ 3 - 3
Documentation/Usage.md

@@ -136,10 +136,10 @@ It's important to remember that the different HTTP methods may have different se
 Alamofire also offers an extension on `URLRequest` to bridge the `httpMethod` property that returns a `String` to an `HTTPMethod` value:
 
 ```swift
-public extension URLRequest {
+extension URLRequest {
     /// Returns the `httpMethod` as Alamofire's `HTTPMethod` type.
-    var method: HTTPMethod? {
-        get { return httpMethod.flatMap(HTTPMethod.init) }
+    public var method: HTTPMethod? {
+        get { httpMethod.flatMap(HTTPMethod.init) }
         set { httpMethod = newValue?.rawValue }
     }
 }