Skip to content

Commit

Permalink
Add request/response
Browse files Browse the repository at this point in the history
  • Loading branch information
hahwul committed Jun 28, 2024
1 parent 8fa2213 commit dea59ab
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
34 changes: 34 additions & 0 deletions lib/caido/helpers/request.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# frozen_string_literal: true

module Caido
# Instance class
class Instance
def request(id)
query("query{
request(id:\"#{id}\"){
id
host
method
query
length
port
isTls
fileExtension
source
alteration
edited
createdAt
raw
response{
id
statusCode
length
roundtripTime
edited
raw
}
}
}")['request']
end
end
end
19 changes: 19 additions & 0 deletions lib/caido/helpers/response.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# frozen_string_literal: true

module Caido
# Instance class
class Instance
def response(id)
query("query{
response(id:\"#{id}\"){
id
statusCode
length
roundtripTime
edited
raw
}
}")['response']
end
end
end

0 comments on commit dea59ab

Please sign in to comment.