Add HTTPData struct
This commit is contained in:
		
							parent
							
								
									c6b5fd7eeb
								
							
						
					
					
						commit
						a46cecd5b3
					
				
							
								
								
									
										15
									
								
								http.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								http.go
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					package step
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import "net/http"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// HTTPData represents information about an ongoing HTTP request that is made
 | 
				
			||||||
 | 
					// available to templates as they are being executed.
 | 
				
			||||||
 | 
					type HTTPData struct {
 | 
				
			||||||
 | 
						// Res is like an http.ResponseWriter.
 | 
				
			||||||
 | 
						Res struct {
 | 
				
			||||||
 | 
							Header http.Header
 | 
				
			||||||
 | 
							WriteHeader func (statusCode int)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						// Req is the HTTP request.
 | 
				
			||||||
 | 
						Req *http.Request
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user