Skip to content

Commit feee587

Browse files
committed
Add User-Agent header to requests
1 parent b9c0d42 commit feee587

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ https://github.com/recombee/swift-api-client
4646
Alternatively, in `Package.swift`:
4747

4848
```swift
49-
.package(url: "https://github.com/recombee/swift-api-client", from: "5.0.0")
49+
.package(url: "https://github.com/recombee/swift-api-client", from: "5.0.1")
5050
```
5151

5252
Then add to your target dependencies:

Sources/RecombeeClient/ApiClient/RecombeeClient.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public class RecombeeClient {
9696
urlRequest.httpMethod = request.method.rawValue
9797
urlRequest.timeoutInterval = request.timeout
9898
urlRequest.addValue("application/json", forHTTPHeaderField: "Content-Type")
99+
urlRequest.addValue("recombee-swift-api-client/5.0.1", forHTTPHeaderField: "User-Agent")
99100

100101
if let body = request.bodyParameters {
101102
urlRequest.httpBody = try JSONEncoder().encode(AnyCodable(body))

0 commit comments

Comments
 (0)