Client returns an *http.Client using a default urlfetch Transport. This
client will check the validity of SSL certificates.
Any deadline of the provided context will be used for requests through this client.
If the client does not have a deadline, then an App Engine default of 60 second is used.
Transport
typeTransportstruct{Contextcontext.Context// Controls whether the application checks the validity of SSL certificates// over HTTPS connections. A value of false (the default) instructs the// application to send a request to the server only if the certificate is// valid and signed by a trusted certificate authority (CA), and also// includes a hostname that matches the certificate. A value of true// instructs the application to perform no certificate validation.AllowInvalidServerCertificatebool}
Transport is an implementation of http.RoundTripper for
App Engine. Users should generally create an http.Client using
this transport and use the Client rather than using this transport
directly.
RoundTrip issues a single HTTP request and returns its response. Per the
http.RoundTripper interface, RoundTrip only returns an error if there
was an unsupported request or the URL Fetch proxy fails.
Note that HTTP response codes such as 5xx, 403, 404, etc are not
errors as far as the transport is concerned and will be returned
with err set to nil.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-05 UTC."],[[["The `urlfetch` package provides a way to fetch URLs within the App Engine environment, using an `http.RoundTripper` implementation."],["The `Client` function returns an `*http.Client` with a default `urlfetch` Transport, including SSL certificate validation and using the context's deadline or a default 60-second timeout."],["`Transport` is an `http.RoundTripper` implementation for App Engine, allowing users to create an `http.Client` for managing HTTP requests."],["The `ErrTruncatedBody` variable indicates that the body of a response was cut off by App Engine's proxy."],["The `RoundTrip` function handles a single HTTP request, returning the response and only reporting errors for unsupported requests or failures of the URL Fetch proxy, not for HTTP status codes like 404 or 500."]]],[]]