Questions tagged as 'http'

2
answers

How to know one HTTP_HOST and redirect to another

That is, when the HTTP_HOST is equal to site1.com or site02.com it redirects to newite.com I've tried something like this below. but it did not work. <?php if ($_SERVER['HTTP_HOST'] == 'site1.com, site02.com'): ?> TESTE <...
asked by 04.08.2018 / 18:44
1
answer

Get name resolution time on HTTP request

Live, Is it possible to get the name resolution time separate from the access time? The code I have is: HttpURLConnection connection; try { URL endereco = new URL(url); connection = (HttpURLConnection) endereco.openConnection();...
asked by 06.04.2018 / 16:43
1
answer

Differences between Cache and CDN usage

What are the advantages and disadvantages of using Content Delivery Network (CDN) and Cache and how can they complement each other?     
asked by 11.03.2017 / 14:47
2
answers

Extract JSON object item with Angular.js

I have an Angular app that uses the Maps API to fetch latitude and longitude, but I can not get latitude and longitude separately. My application works as follows, the user types the zip code and the system using the ViaCEP API loads all data...
asked by 10.03.2016 / 20:16
1
answer

What does it mean to put a type before a declaration? [duplicate]

Hello, I was studying HTTP Requests in Java when I came across a code and on a certain line there was a somewhat strange statement for me, can anyone explain to me what a type means before a statement? HttpURLConnection connection = null; U...
asked by 08.01.2018 / 23:24
1
answer

Using FileServer to share files

I'm learning Golang and to practice I'm doing some small "projects", my idea is to just share a folder from my windows or some file through my local wifi network using Golang's net / http package. I used this little code below to "upar" a folder...
asked by 14.12.2017 / 20:49
1
answer

Go through a site's response tags C #

I am doing a query in google by C # and I need to get the query return the Query Title and the Query Link returned. I got my return as follows: public class GoogleSearch { private string _TituloPesquisa; private string _LinkPesquisa...
asked by 14.07.2017 / 21:09
1
answer

Identify site pages with broken HTTPS padlock

I'm working on an e-commerce site and I noticed that some pages are with the https lock broken and I was able to fix them. But nothing assures me if other pages with the same problem exist or not. Is there a tool for this?     
asked by 14.03.2017 / 12:59
1
answer

Why does Retrofit throw an exception when the status code is 204?

After a GET query only to check if a content exists on the server, the return is 200 (exists) or 204 (does not exist). Why does Retrofit throw the exception below when the server returns the Status Code: 204 In Content ?    java.net.P...
asked by 08.03.2017 / 21:39
1
answer

How can I create my own protocol as well as HTTP?

See this code below. It creates a server with Node.js. But if I change the var http for example: var xyz = require ("xyz"), var server = xyz.createserver ... gives error. var http = require("http"); var server = http.createServer(functi...
asked by 25.05.2017 / 08:16