response.go — fiber Source File
Architecture documentation for response.go, a go file in the fiber codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 97187a97_65cf_44b1_00f0_eef4c434ff1c["response.go"] c0b86961_3ef1_0168_52fc_98627566ed27["bytes"] 97187a97_65cf_44b1_00f0_eef4c434ff1c --> c0b86961_3ef1_0168_52fc_98627566ed27 style 97187a97_65cf_44b1_00f0_eef4c434ff1c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
package client
import (
"bytes"
"errors"
"fmt"
"io"
"io/fs"
"iter"
"os"
"path/filepath"
"sync"
"github.com/gofiber/utils/v2"
"github.com/valyala/fasthttp"
)
// Response represents the result of a request. It provides access to the response data.
type Response struct {
client *Client
request *Request
RawResponse *fasthttp.Response
cookie []*fasthttp.Cookie
}
// setClient sets the client instance in the response. The client object is used by core functionalities.
func (r *Response) setClient(c *Client) {
r.client = c
}
// setRequest sets the request object in the response. The request is released when Response.Close is called.
func (r *Response) setRequest(req *Request) {
r.request = req
}
// Status returns the HTTP status message of the executed request.
func (r *Response) Status() string {
return string(r.RawResponse.Header.StatusMessage())
}
// StatusCode returns the HTTP status code of the executed request.
func (r *Response) StatusCode() int {
return r.RawResponse.StatusCode()
}
// Protocol returns the HTTP protocol used for the request.
func (r *Response) Protocol() string {
return string(r.RawResponse.Header.Protocol())
}
// Header returns the value of the specified response header field.
func (r *Response) Header(key string) string {
return utils.UnsafeString(r.RawResponse.Header.Peek(key))
}
// Headers returns all headers in the response using an iterator.
// Use maps.Collect() to gather them into a map if needed.
//
// The returned values are valid only until the response object is released.
// ... (182 more lines)
Domain
Subdomains
Functions
Classes
Dependencies
- bytes
Source
Frequently Asked Questions
What does response.go do?
response.go is a source file in the fiber codebase, written in go. It belongs to the FiberClient domain, Transport subdomain.
What functions are defined in response.go?
response.go defines 2 function(s): AcquireResponse, ReleaseResponse.
What does response.go depend on?
response.go imports 1 module(s): bytes.
Where is response.go in the architecture?
response.go is located at client/response.go (domain: FiberClient, subdomain: Transport, directory: client).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free