Posts by Tom Melo • 1,703 points
58 posts
-
1
votes3
answers2456
viewsA: How do I know if I’m on an anonymous or normal Chrome page?
To Filesystem API is disabled in Incognito mode. The code you mentioned works... var fs = window.RequestFileSystem || window.webkitRequestFileSystem; fs(window.TEMPORARY, 10, function() {…
-
1
votes1
answer24
viewsA: Trusted credentials with Facebook Javascript SDK
The recommended way is to follow the authentication flow defined by Facebook, so they guarantee the "safe way". But I imagine you’re authenticating with the Facebook api on the front, taking user…
-
10
votes2
answers2058
viewsA: What would the route model look like for a Rest API in more complex operations?
A little REST standards(no mandatory): 1 - Use of nouns instead of verbs: /users - OK /cars - OK /getAllUsers - NOK /createNewUser - NOK /getAllCars - NOK 2 - GET request does not change the status…
-
1
votes1
answer659
viewsA: Read xml in Java
You can use the Jackson-xml-dataformat For this just add the dependency in your pom.xml: <dependency> <groupId>com.fasterxml.jackson.dataformat</groupId>…
-
0
votes3
answers852
viewsA: Web Security api: SSL?
1 - SSL is the least you should have if you intend to expose an api to a client, but this is not very related to your problem. 2 - While you don’t have a mobile app consuming your api, you have some…
-
1
votes2
answers3257
viewsA: How to remove a part of a string?
A very lazy way to solve: String text = "Meu nome: \"Mariane Teixeira\", Minha idade: \"22\""; String [] textArray = text.split("\""); System.out.println(Arrays.toString(textArray));…
-
2
votes1
answer3371
viewsA: Configuring CORS in Spring Security
Try: @EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http.cors().and() //... seu…
-
2
votes1
answer595
viewsA: Questions Spring Boot Web App -> Android
The ideal would be to have an api that both your front and mobile app could consume... But since it’s all written down, you can reuse the other layers (service, Repository, etc) you’ve already…