Function
getHTTPClient
(ctx context.DnoteCtx, options *requestOptions)
Source from the content-addressed store, hash-verified
| 100 | } |
| 101 | |
| 102 | func getHTTPClient(ctx context.DnoteCtx, options *requestOptions) *http.Client { |
| 103 | if options != nil && options.HTTPClient != nil { |
| 104 | return options.HTTPClient |
| 105 | } |
| 106 | |
| 107 | if ctx.HTTPClient != nil { |
| 108 | return ctx.HTTPClient |
| 109 | } |
| 110 | |
| 111 | return &http.Client{} |
| 112 | } |
| 113 | |
| 114 | func getExpectedContentType(options *requestOptions) string { |
| 115 | if options != nil && options.ExpectedContentType != nil { |
Tested by
no test coverage detected