Fixed indentations.
This commit is contained in:
parent
735423e8b3
commit
5f8ab738a3
18
README.md
18
README.md
|
@ -15,10 +15,10 @@ Media types are represented by the ``MediaType`` Swift type.
|
|||
You can create a media type in a type-safe manner using one of the possible cases. You can also create media type
|
||||
instances simply by using string literals.
|
||||
|
||||
```swift
|
||||
MediaType.application(.json()) // is equivalent to
|
||||
```swift
|
||||
MediaType.application(.json()) // is equivalent to
|
||||
let mediaType: MediaType = "application/json"
|
||||
```
|
||||
```
|
||||
|
||||
It is also possible to create a ``MediaType`` instance from a string variable as shown in the following example.
|
||||
|
||||
|
@ -31,8 +31,8 @@ let mediaType = MediaType(rawValue: rawMediaType)
|
|||
|
||||
Media type suffixes and parameters are supported both via string literals and ``MediaType`` cases.
|
||||
|
||||
```swift
|
||||
MediaType.application(.atom(nil, ["charset": "utf-8"])) // is equivalent to
|
||||
```swift
|
||||
MediaType.application(.atom(nil, ["charset": "utf-8"])) // is equivalent to
|
||||
let mediaType: MediaType = "application/atom; charset=utf-8"
|
||||
|
||||
MediaType.application(.atom(.xml)) // is equivalent to
|
||||
|
@ -40,14 +40,14 @@ let mediaType: MediaType = "application/atom+xml"
|
|||
|
||||
MediaType.application(.atom(.xml, ["charset": "utf-8"])) // is equivalent to
|
||||
let mediaType: MediaType = "application/atom+xml; charset=utf-8"
|
||||
```
|
||||
```
|
||||
|
||||
### Trees
|
||||
|
||||
You can create media type trees by using either the string literal syntax, or using the `other` case of a particular
|
||||
media type.
|
||||
|
||||
```swift
|
||||
MediaType.application(.other("vnd.efi.img")) // is equivalent to
|
||||
```swift
|
||||
MediaType.application(.other("vnd.efi.img")) // is equivalent to
|
||||
"application/vnd.efi.img"
|
||||
```
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue