summaryrefslogtreecommitdiff
path: root/internal/api/model/admin.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-11-27 15:02:52 +0100
committerLibravatar GitHub <noreply@github.com>2023-11-27 14:02:52 +0000
commit5eddef6c9b66fd35dc9473578d4e1a3b1b8d7b08 (patch)
treeee67f8a683a351580bc0b6365067001c34ff1cc1 /internal/api/model/admin.go
parent[performance] http response encoding / writing improvements (#2374) (diff)
downloadgotosocial-5eddef6c9b66fd35dc9473578d4e1a3b1b8d7b08.tar.xz
[feature] Add `/api/v1/admin/debug/apurl` endpoint (#2359)
Diffstat (limited to 'internal/api/model/admin.go')
-rw-r--r--internal/api/model/admin.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/internal/api/model/admin.go b/internal/api/model/admin.go
index ca4aa32da..60036c19f 100644
--- a/internal/api/model/admin.go
+++ b/internal/api/model/admin.go
@@ -210,3 +210,22 @@ type AdminInstanceRule struct {
UpdatedAt string `json:"updated_at"` // when was item last updated
Text string `json:"text"` // text content of the rule
}
+
+// DebugAPUrlResponse provides detailed debug
+// information for an AP URL dereference request.
+//
+// swagger:model debugAPUrlResponse
+type DebugAPUrlResponse struct {
+ // Remote AP URL that was requested.
+ RequestURL string `json:"request_url"`
+ // HTTP headers used in the outgoing request.
+ RequestHeaders map[string][]string `json:"request_headers"`
+ // HTTP headers returned from the remote instance.
+ ResponseHeaders map[string][]string `json:"response_headers"`
+ // HTTP response code returned from the remote instance.
+ ResponseCode int `json:"response_code"`
+ // Body returned from the remote instance.
+ // Will be stringified bytes; may be JSON,
+ // may be an error, may be both!
+ ResponseBody string `json:"response_body"`
+}