MCPcopy
hub / github.com/NVIDIA/aistore / objectHandler

Method objectHandler

ais/proxy.go:387–405  ·  view source on GitHub ↗

verb /v1/objects/

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

385
386// verb /v1/objects/
387func (p *proxy) objectHandler(w http.ResponseWriter, r *http.Request) {
388 switch r.Method {
389 case http.MethodGet:
390 p.httpobjget(w, r)
391 case http.MethodPut:
392 p.httpobjput(w, r)
393 case http.MethodDelete:
394 p.httpobjdelete(w, r)
395 case http.MethodPost:
396 p.httpobjpost(w, r)
397 case http.MethodHead:
398 p.httpobjhead(w, r)
399 case http.MethodPatch:
400 p.httpobjpatch(w, r)
401 default:
402 cmn.WriteErr405(w, r, http.MethodDelete, http.MethodGet, http.MethodHead,
403 http.MethodPost, http.MethodPut)
404 }
405}
406
407// "Easy URL" (feature) is a simple alternative mapping of the AIS API to handle
408// URLs paths that look as follows:

Callers 1

easyURLHandlerMethod · 0.95

Calls 7

httpobjgetMethod · 0.95
httpobjputMethod · 0.95
httpobjdeleteMethod · 0.95
httpobjpostMethod · 0.95
httpobjheadMethod · 0.95
httpobjpatchMethod · 0.95
WriteErr405Function · 0.92

Tested by

no test coverage detected