Skip to content

Commit 5687c7e

Browse files
committed
fix the respose function + edit ci.yml
1 parent 53ce83a commit 5687c7e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: CI
22
on:
33
push:
4-
branches: [main]
4+
branches:
5+
- main
6+
- 'feat/**'
57
tags: ["*"]
68
pull_request:
79
jobs:

src/client.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,14 +427,14 @@ end
427427

428428

429429
response(::Type{Nothing}, resp::Downloads.Response, body) = nothing::Nothing
430-
response(::Type{T}, resp::Downloads.Response, body) where {T <: Real} = parse(T, String(body))::T
430+
response(::Type{T}, resp::Downloads.Response, body) where {T <: Real} = Base.parse(T, String(body))::T
431431
response(::Type{T}, resp::Downloads.Response, body) where {T <: String} = String(body)::T
432432
function response(::Type{T}, resp::Downloads.Response, body) where {T}
433433
ctype = header(resp, "Content-Type", "application/json")
434434
if is_json_mime(ctype)
435435
(length(body) == 0) && return T() # Handle empty body for model types
436436
# Use JSON.read for direct deserialization
437-
return JSON.read(body, T)::T
437+
return JSON.parse(body, T)::T
438438
else
439439
# Fallback for non-JSON content
440440
return convert(T, body)

0 commit comments

Comments
 (0)