Commit 4874e08c02806a9f11a38c67eacd588b90b1ce84
1 parent
e556d107
Exists in
master
and in
1 other branch
Adição do "metodoRequisicaoGET.setRequestHeader("user-agent",
"NewUseAgent/1.0");"
Showing
2 changed files
with
2 additions
and
0 deletions
Show diff stats
src/main/java/br/com/ases/infra/WebChecker.java
... | ... | @@ -45,6 +45,7 @@ public class WebChecker { |
45 | 45 | public WebChecker withGetRequest() { |
46 | 46 | this.method = new GetMethod(this.url); |
47 | 47 | //this.method.setRequestHeader("user-agent", "Mozilla/5.0"); |
48 | + this.method.setRequestHeader("user-agent", "NewUseAgent/1.0"); | |
48 | 49 | this.method.setRequestHeader("http.agent", "Jakarta Commons-HttpClient/3.1"); |
49 | 50 | this.method.setFollowRedirects(true); |
50 | 51 | return this; | ... | ... |
src/main/java/br/com/ases/model/utilities/Validate.java
... | ... | @@ -102,6 +102,7 @@ public class Validate { |
102 | 102 | |
103 | 103 | metodoRequisicaoGET = new GetMethod(UrlConvertida.toExternalForm()); |
104 | 104 | |
105 | + metodoRequisicaoGET.setRequestHeader("user-agent", "NewUseAgent/1.0"); | |
105 | 106 | metodoRequisicaoGET.setRequestHeader("http.agent", "Jakarta Commons-HttpClient/3.1"); |
106 | 107 | metodoRequisicaoGET.setFollowRedirects(true); |
107 | 108 | ... | ... |