chore: update landerctl to use location header
							parent
							
								
									5d0cafbc27
								
							
						
					
					
						commit
						eff1b13065
					
				| 
						 | 
					@ -9,6 +9,7 @@ if [ "$1" = g ]; then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
elif [ "$1" = s ]; then
 | 
					elif [ "$1" = s ]; then
 | 
				
			||||||
    curl \
 | 
					    curl \
 | 
				
			||||||
 | 
					        -w "${URL}%header{location}" \
 | 
				
			||||||
        -XPOST \
 | 
					        -XPOST \
 | 
				
			||||||
        -d "$2" \
 | 
					        -d "$2" \
 | 
				
			||||||
        -H "X-Api-Key: $API_KEY" \
 | 
					        -H "X-Api-Key: $API_KEY" \
 | 
				
			||||||
| 
						 | 
					@ -16,6 +17,7 @@ elif [ "$1" = s ]; then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
elif [ "$1" = sl ]; then
 | 
					elif [ "$1" = sl ]; then
 | 
				
			||||||
    curl \
 | 
					    curl \
 | 
				
			||||||
 | 
					        -w "${URL}%header{location}" \
 | 
				
			||||||
        -XPOST \
 | 
					        -XPOST \
 | 
				
			||||||
        -d "$2" \
 | 
					        -d "$2" \
 | 
				
			||||||
        -H "X-Api-Key: $API_KEY" \
 | 
					        -H "X-Api-Key: $API_KEY" \
 | 
				
			||||||
| 
						 | 
					@ -23,6 +25,7 @@ elif [ "$1" = sl ]; then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
elif [ "$1" = p ]; then
 | 
					elif [ "$1" = p ]; then
 | 
				
			||||||
    curl \
 | 
					    curl \
 | 
				
			||||||
 | 
					        -w "${URL}%header{location}" \
 | 
				
			||||||
        -XPOST \
 | 
					        -XPOST \
 | 
				
			||||||
        -H "X-Api-Key: $API_KEY" \
 | 
					        -H "X-Api-Key: $API_KEY" \
 | 
				
			||||||
        --data-binary @"$2" \
 | 
					        --data-binary @"$2" \
 | 
				
			||||||
| 
						 | 
					@ -30,6 +33,7 @@ elif [ "$1" = p ]; then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
elif [ "$1" = pl ]; then
 | 
					elif [ "$1" = pl ]; then
 | 
				
			||||||
    curl \
 | 
					    curl \
 | 
				
			||||||
 | 
					        -w "${URL}%header{location}" \
 | 
				
			||||||
        -XPOST \
 | 
					        -XPOST \
 | 
				
			||||||
        -H "X-Api-Key: $API_KEY" \
 | 
					        -H "X-Api-Key: $API_KEY" \
 | 
				
			||||||
        --data-binary @"$2" \
 | 
					        --data-binary @"$2" \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,5 +24,5 @@ int main() {
 | 
				
			||||||
  gctx->api_key = "test";
 | 
					  gctx->api_key = "test";
 | 
				
			||||||
  event_loop *el = http_loop_init(gctx);
 | 
					  event_loop *el = http_loop_init(gctx);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  http_loop_run(el, 8000);
 | 
					  http_loop_run(el, 18080);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue