Skip to content

Instantly share code, notes, and snippets.

View eisenreich's full-sized avatar

Daniel Eisenreich eisenreich

  • Tuttlingen
View GitHub Profile
@eisenreich
eisenreich / wait_for_http_200.sh
Last active July 5, 2024 16:20 — forked from rgl/wait_for_http_200.sh
Wait for HTTP endpoints to return 200 OK with bash, curl and timeout
#!/bin/bash
##############################################################################################
# Wait for URLs until return HTTP 200
#
# - Just pass as many urls as required to the script - the script will wait for each, one by one
#
# Example: ./wait_for_urls.sh "${MY_VARIABLE}" "http://192.168.56.101:8080"
##############################################################################################
@eisenreich
eisenreich / buildRequestFromPath.java
Last active February 5, 2021 07:38
Build new request from path (Spring > 2.2.0.RELEASE)
private HttpServletRequest buildRequestFromPath(final HttpServletRequest request, final String path) {
return new HttpServletRequestWrapper(request) {
@Override
public String getRequestURI() {
return path;
}
@Override
public String getPathInfo() {