Skip to content

Commit

Permalink
status code bandaid
Browse files Browse the repository at this point in the history
  • Loading branch information
Furrior committed Jan 4, 2025
1 parent 73411b9 commit 0188fe9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modular_bandastation/tts/code/SSHttp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ SUBSYSTEM_DEF(http)
/// Callback for executing after async requests. Will be called with an argument of [/datum/http_response] as first argument
var/datum/callback/cb

/datum/http_request/into_response()
. = ..()

// HACK: I have no idea why this is necessary, but it is.
var/static/reg = ": status code ([0-9]{3})"
var/matched = findtext(_raw_response, reg)
if (matched)
R.status_code = text2num(copytext(matched, 15))

Check failure on line 90 in modular_bandastation/tts/code/SSHttp.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "R"

Check warning on line 90 in modular_bandastation/tts/code/SSHttp.dm

View workflow job for this annotation

GitHub Actions / Run Linters

field access requires static type: "status_code"

Check failure on line 90 in modular_bandastation/tts/code/SSHttp.dm

View workflow job for this annotation

GitHub Actions / Run Linters

OD0404: Unknown identifier "status_code"

/world/Del()
rustgss220_close_async_http_client()
. = ..()
Expand Down

0 comments on commit 0188fe9

Please sign in to comment.