250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 풀스택
- Animation
- 비전공 개발자
- javascript
- jQuery
- SWIFT
- front-end
- effect
- 개발자
- MAC
- image
- button
- keyframes
- php
- 프론트엔드
- 비전공자
- iOS 개발자
- iPhone
- xcode
- hover
- html5
- 백엔드
- 자바스크립트
- css3
- 애니메이션
- HTML
- IOS
- react
- CSS
- ipad
Archives
- Today
- Total
비전공자 개발일기
WKWebView URL Query & Header Setting 본문
728x90
SMALL
let url = "your URL"
var components = URLComponents(string: url)!
components.queryItems = URLQueryItem(name: "name", value: value.trimmingCharacters(in: .whitespaces))
components.queryItems = [URLQueryItem(name: "name1", value: value.trimmingCharacters(in: .whitespaces)), URLQueryItem(name: "name2", value: value.trimmingCharacters(in: .whitespaces))]
var request = URLRequest(url: components.url!)
request.setValue("value", forHTTPHeaderField: "key")
URL Query Setting
URLComponents를 사용하지 않은 경우 | https://www.address.com/ |
URLComponents를 사용하고 URLQueryItem을 1개만 설정한 경우 | https://www.address.com/?name=value |
URLComponents를 사용하고 URLQueryItem을 2개 이상 설정한 경우 |
https://www.address.com/?name1=value1&name2=value2&... |
URL Header Setting
https://developer.mozilla.org/ko/docs/Web/HTTP/Headers
728x90
LIST
'SWIFT' 카테고리의 다른 글
WKWebView OverScroll Disable Setting (0) | 2023.03.15 |
---|---|
Swift WKWebView Debugging with Safari (0) | 2023.03.09 |
SafeArea Color Control (0) | 2023.03.06 |
WKWebView Reload Code (0) | 2023.03.04 |
Swift Image Upload to Server(PHP) (0) | 2023.03.03 |