-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
145 additions
and
288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// ContentType.swift | ||
// SwiftHelpers/Network | ||
// | ||
// Created by Leo Ho on 2023/6/14. | ||
// | ||
|
||
import Foundation | ||
|
||
public extension HTTP { | ||
|
||
/// Define the HTTP Content-Type of the HTTP Request | ||
enum ContentType: String, CustomStringConvertible { | ||
|
||
/// HTTP Request body Content-Type,JSON | ||
case json = "application/json" | ||
|
||
/// HTTP Request body Content-Type,XML | ||
case xml = "application/xml" | ||
|
||
/// HTTP Request body Content-Type,text/plain | ||
case textPlain = "text/plain" | ||
|
||
/// HTTP Request body Content-Type,x-www-form-urlencoded | ||
case x_www_form_urlencoded = "application/x-www-form-urlencoded" | ||
|
||
/// HTTP Request body Content-Type,multipart/form-data | ||
case formData = "multipart/form-data" | ||
|
||
/// HTTP Request body Content-Type,application/octet-stream | ||
case octetStream = "application/octet-stream" | ||
|
||
public var description: String { | ||
let base = "[HTTP Content-Type] " | ||
return base + self.rawValue | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.