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 | 29 | 30 | 31 |
Tags
- 비전공자
- 비전공 개발자
- HTML
- IOS
- CSS
- hover
- javascript
- 개발자
- image
- html5
- MAC
- 자바스크립트
- 애니메이션
- jQuery
- xcode
- keyframes
- react
- effect
- 프론트엔드
- css3
- 풀스택
- SWIFT
- php
- button
- front-end
- iPhone
- ipad
- iOS 개발자
- 백엔드
- Animation
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
HTTP 헤더 - HTTP | MDN
HTTP 헤더는 클라이언트와 서버가 요청 또는 응답으로 부가적인 정보를 전송할 수 있도록 해줍니다. HTTP 헤더는 대소문자를 구분하지 않는 이름과 콜론 ':' 다음에 오는 값(줄 바꿈 없이)으로 이루
developer.mozilla.org
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 |