module Grip::Extensions::Context
  
  Direct including types
Defined in:
grip/extensions/context.crInstance Method Summary
- 
        #binary(content, content_type = "application/octet-stream")
        
          Sends a response with no formating. 
- 
        #delete_req_header(key)
        
          Deletes request header. 
- 
        #delete_resp_header(key)
        
          Deletes response header. 
- #exception : Exception | Nil
- #exception=(exception : Exception | Nil)
- #exec(&)
- 
        #fetch_body_params
        
          Fetches the parsed URL encoded parameters from an endpoint. 
- 
        #fetch_file_params
        
          Fetches the parsed multipart data from an endpoint. 
- 
        #fetch_json_params
        
          Fetches the parsed JSON content from an endpoint. 
- 
        #fetch_path_params
        
          Fetches the parsed URL data from an endpoint. 
- 
        #fetch_query_params
        
          Fetches the parsed GETquery parameters from an endpoint.
- 
        #get_req_cookie(key)
        
          Get cookie from request or nil if key does not exist 
- 
        #get_req_header(key)
        
          Gets request header, raises if not found. 
- 
        #get_req_header?(key)
        
          Gets request header, returns nil if not found. 
- 
        #get_resp_header(key)
        
          Gets response header. 
- 
        #halt
        
          Halts the execution of the endpoint 
- 
        #html(content, content_type = "text/html; charset=UTF-8")
        
          Sends a response with the content formated as html. 
- 
        #json(content, content_type = "application/json; charset=UTF-8")
        
          Sends a response with the content formated as json. 
- 
        #merge_resp_headers(headers)
        
          Merges the response headers with another hashmap 
- #parameters : Grip::Parsers::ParameterBox | Nil
- #parameters=(parameters : Grip::Parsers::ParameterBox | Nil)
- 
        #put_req_header(key, value)
        
          Assigns request header in the headers hashmap. 
- 
        #put_resp_cookie(key, val)
        
          Sets response cookie from string 
- 
        #put_resp_cookie(cookie)
        
          Sets response cookie 
- 
        #put_resp_header(key, value)
        
          Assigns response header in the headers hashmap. 
- 
        #put_status(status_code = HTTP::Status::OK)
        
          Assigns response status code. 
- #redirect(url = "/", status_code = HTTP::Status::FOUND)
- 
        #send_file(path : String, mime_type : String | Nil = nil, gzip_enabled : Bool = false)
        
          Sends a file 
- 
        #send_resp(content)
        
          Sends a response with a status code of OK. 
- 
        #text(content, content_type = "text/plain; charset=UTF-8")
        
          Sends a response with the content formated as text. 
Instance Method Detail
Sends a response with no formating.
Sends a response with the content formated as html.
Sends a response with the content formated as json.
Sends a file
Sends a response with the content formated as text.