Most voted "http" questions
Hypertext Transfer Protocol (HTTP) is a network protocol, application layer of the OSI model, which is used for content transfer on the World Wide Web.
Learn more…465 questions
Sort by count of
-
198
votes3
answers154272
viewsWhat is REST and Restful?
I always hear of REST and RESTful, but I can’t tell the difference between us or what it’s for. It seemed to me something with Common.js-style application architecture pattern.…
-
70
votes1
answer4219
viewsWhat are the advantages of using the right HTTP methods?
I have seen many people defending the use of HTTP methods correctly, that is, respecting the semantics of the methods defined in the specification when making a request. GET should only be used to…
httpasked 9 years, 9 months ago bfavaretto 64,705 -
45
votes3
answers10406
viewsHow does HTTPS (SSL) work?
Cryptography is something fundamental in web, because it provides us with privacy and security. It’s even possible that this is standard at HTTP 2. My question is: How does encryption via HTTP work?…
-
45
votes4
answers26195
viewsWhat is a payload?
I’ve always seen in some frameworks that work with REST or with sending data in JSON format in a request using the expression payload. What does that name mean in HTTP requests? What is specifically…
-
40
votes3
answers33382
viewsWhat are the HTTP request methods, and what is the difference between them?
What are the HTTP request methods, among which are GET, POST and DELETE? What to use each of them, and what is the difference between them?
-
39
votes4
answers17554
viewsWhat is the difference between 401 Unauthorized and 403 Forbidden?
When designing an application, it is common for me to be in doubt as to which HTTP code to return when a user does not have access to a certain resource: if it is 401 Unauthorized or if it is 403…
-
34
votes3
answers1426
viewsHow does the HTTP protocol process requests?
HTTP methods are used to send and receive data from the server, such as the GET (recovers data) and the POST (sends the data). Following the above definition to understand very well the purpose of…
-
33
votes4
answers9005
viewsWhy is HATEOAS important?
I am studying REST and Web API development and I have heard about HATEOAS (Hypertext as the engine of application state). I understood the idea: when answering a request, in addition to what we…
-
31
votes4
answers52318
viewsWhat is the difference between PUT and POST?
Some teach that POST is to send data to create something and that PUT is to update, but found poorly explained. So, after all, what is the difference between the PUT method and the POST? When I must…
-
29
votes2
answers10012
viewsWhat are Network Sockets and Websockets?
I am studying real-time Node.js programming and I have arisen some doubts regarding network sockets. I found nothing explained in detail, so I decided to open the question. What is a network socket…
-
29
votes3
answers1205
viewsWhat are Proxy, Gateway and Tunnel in the HTTP protocol?
In the HTTP protocol specification, more precisely at RFC 7230, provision is made for the possibility of intermediaries between the user agent (UA), the entity that makes the HTTP request, and…
-
25
votes3
answers2308
viewsWhat HTTP status should I use for when a POST parameter is missing?
I have a form that will be submitted to the server via ajax, using a plugin for this. When the form is not filled in correctly (in case when a mandatory parameter is missing), I want to return a…
-
25
votes1
answer18896
viewsWhat is Connection Keep-Alive?
When I check the headers I’m sending on a php page, which is installed locally, I always see this Connection: Keep-Alive. Example: var_dump(getallheaders()); Exit: array (size=7) 'Host' => string…
-
24
votes4
answers8680
viewsWhat are the differences between HTTP 2 and HTTP 1.1?
A very pertinent question was asked earlier to find out what the differences between the HTTP 1.1and the HTTP 1.0. I wish I knew exactly the same but between HTTP 2.0 and HTTP 1.1. Additionally,…
httpasked 8 years ago Bruno Costa 5,878 -
23
votes3
answers599
viewsIs mixing HTTP with HTTPS a problem?
On my website I am using links normal HTTP, but where it contains data transaction, as in forms, for example, use HTTPS which is from a shared SSL certificate provided by my hosting server. I don’t…
-
23
votes3
answers4843
viewsFor a search with no results, should the HTTP response be 404, 204 or 200 with an empty body?
When we search for a resource on the server with some type of filter, for example, a user search, a list with the data is returned (in JSON, XML or even already formatted in HTML) But some searches…
-
20
votes2
answers14582
viewsWhat is Basic Auth?
What is and how Basic Auth works? In which scenarios it should be used? It is safe to use it currently, since we already have Oauth and Oauth2, among other more modern forms of authentication?…
-
20
votes2
answers907
viewsWhat is HTTP Response splitting?
Reading about HTTP headers I ended up coming across a function filter that removed both invalid characters from the header field value (header field), how many multiple characters CRLF. This second…
-
19
votes1
answer228
viewsWhen and why to use range 1xx status?
The range 1xx of HTTP response status codes are informative, the description of the Wikipedia, translated from rfc2068: "Request received, continuing the process. This status code class indicates a…
-
18
votes5
answers3306
viewsForm submission security in HTTP header
After some tests on the site of Yahoo and Facebook I realized that after filling in my username and password and clicking on Login, with the developer tools opened in the option Network (Chrome or…
-
18
votes1
answer2609
viewsWhat is a "stateless protocol" like HTTP?
Lately I have been reading a lot of material about the web and I always see someone mentioning that HTTP is a stateless protocol (stateless Protocol). Follows a passage taken from RFC 2616 (my…
-
18
votes2
answers4597
viewsWhat are the differences between HTTP 1.1 vs HTTP 1.0?
What are the differences between them, and for which case each is most recommended? We have the documentation of HTTP 1.1 and that of HTTP 1.0, but they are long, and I would like a brief…
-
17
votes1
answer805
viewsIn what language was HTTP written when implemented on the Web?
I want to know in which language HTTP was developed.
-
17
votes5
answers2766
viewsWhat HTTP code should I use when I can’t authenticate to third-party services with login and password provided by the client earlier?
I am implementing a service from a website that does the following: My website (A) connects to some external services provided by third parties (B, C and D) using webservices. In fact A is a REST…
-
17
votes1
answer1019
viewsHow to send Tokens from server to client?
I am creating an API, I use authentication via Token (JWT), I want this token to be valid for, for example, 10 minutes, and, with each request, return a new Token, so the user will have access while…
-
16
votes1
answer2302
viewsDifference between normal request/response, long-Polling, websockets, Webrtc and Server-Sent Events?
I had the wrong idea long-time, I started to notice that in fact it is a "technique" that runs on top of a normal request, I started researching and noticed several questions on the site, but most…
-
15
votes2
answers6768
viewsWhat is, and how it works, a Etag
I have been making socket requests to my Apache server in order to create a prototype of Framework, and for each different file that was accessed, returned a Etag in the header. What good is a Etag?…
-
15
votes1
answer77173
viewsIs every HTTPS and HTTP connection always linked to port 443 and 80 respectively?
Every HTTP connection always has port 80 and every HTTPS connection always has port 443? Because I realize that browsers don’t need you to pass the port to make connections to those specific ports.…
-
15
votes1
answer3432
viewsWhat is the purpose of Middleware in relation to Apis and Web Applications made in Slim?
I’m reading regarding Middleware no framework Slim, however, I could not understand the purpose of Middleware in relation to Rest Apis or Web Applications built in Slim. I was also talking to…
-
15
votes1
answer314
viewsIs the HTTP protocol in version 2 still stateless (stateless)?
HTTP is a stateless protocol (stateless), i.e., requests and responses are independent, so the server does not need to store any data from any previous action. But with its new version (HTTP 2), a…
-
15
votes2
answers189
viewsAre HTTP headers case sensitive or case insensitive?
Two headers with the same name but one in upper case and the other in lower case, by default, are considered the same? What HTTP does, unite them, ignore some or send both? An application that waits…
-
14
votes3
answers1699
viewsWhat HTTP status returns to an expired token?
I have an application where the user can request a token for password recovery. However, I give this token a period of 2 hours. When the token expires, I want to return an error to the client,…
-
14
votes0
answers398
viewsHow to make ajax calls through reverse proxy in elegant way?
I have a project that validates, in Javascript, the structure of a JSON. Here is more or less the structure I had used to rescue the structure asynchronously, as well as what would be the static…
-
13
votes1
answer4028
viewsWhat does Handshake mean?
While studying about Websocket, I read the following sentence: Its only relation to HTTP is that its Handshake is interpreted by HTTP servers as a request for upgrade. In this context, what…
-
13
votes1
answer10486
viewsWhat is the difference between the PUT method and the PATCH?
Some teach that to upgrade uses the PUT and others teach using the PATCH. So, after all, what is the difference between the PUT method and the PATCH? When I must wear one and the other?…
-
13
votes1
answer13920
viewsHow does the "Referrer Policy" header work?
I was doing some tests using Opera browser (same engine/engine as Chrome) and HTTP request sends this: Referrer Policy: no-referrer-when-downgrade For example in http://localhost get this: Request…
-
13
votes1
answer153
viewsWill HTTP/2 still need a security certificate or is it already encrypted by default?
It’s a layman’s question, but I’d like some information on the subject... At HTTP we have the possibility to use a security certificate type SSL to ensure the encryption of the data that circulates…
-
12
votes3
answers4720
viewsImplement HTTP POST and GET Requests on Android
How do I send information via get to an Android url, passing parameters? And how do I return data like JSON from my PHP?
-
12
votes1
answer191
viewsIs the appropriate type to serve Javascript "text/javascript" or "application/x-javascript" or "application/javascript"?
When analyzing the source code of several pages, it can be seen that the Javascript headers vary with regard to the mime (English) indicated, but the doubt remains about which we should effectively…
-
12
votes1
answer261
viewsWhat should the server return in an OPTIONS request?
Before sending any request to the server, browsers automatically send a request of the type OPTIONS to know some server information What information does the server need to send? Only CORS headers?…
-
12
votes1
answer373
viewsWhat are the Rfcs?
In questions related to HTTP protocol it is very common to see reference to one or more RFC... But what they are? Are only related to HTTP? Some are referenced as obsolete, which are the current…
-
12
votes1
answer1426
viewsWhat is the Richardson Maturity Model?
In a question I asked about HTTP was commented on the Richardson Maturity Model, from what I understand, it serves to define how semantic your server is relative to HTTP (if you use verbs and return…
-
11
votes1
answer132
viewsWhy do CDN web addresses not specify protocol?
Usually web addresses start with http:// or https://, but CDN addresses like jQuery and Bootstrap start with //. Example: <link rel="stylesheet"…
-
11
votes4
answers3455
viewsIs it possible to communicate Client-Server in real time via HTTP?
Using TCP sockets I can put a server app on Listening and have clients connect and wait for requests both on the server and on the client, with the possibility of the server sending information to…
-
11
votes2
answers3118
viewsAre REST and HTTP the same thing?
I would like to know the difference between REST and HTTP. Since a while, I have been studying these two subjects and they seem to me to be the same thing.
-
11
votes1
answer30199
viewsWhat is the difference between x-www-form-urlencoded and form-data?
Is there any relevant difference between content-type x-www-form-urlencoded and form-data? I always have doubts when I should use between one or the other, because I don’t know if there is any…
-
11
votes1
answer446
viewsWhat is HTTP/3? Will it replace HTTP/2?
In the question What is the latest and stable version of HTTP? The existence of version 3 of the HTTP protocol has been cited. Is this new protocol specification intended to replace the HTTP/2…
-
10
votes5
answers2222
viewsWhich libraries to develop a Restful API in JAVA?
I’m a beginner in java and would like to create a RESTFUL API but I don’t know which library to use or how to use it. Can someone refer me good tutorials or some libraries for study. I would like to…
-
10
votes2
answers664
viewsRedirection: Location vs Refresh
When to use Location and Refresh to redirect. header( "Location: www.dominio.com" , TRUE , 302 ) header( "Refresh:5; url=www.dominio.com" , TRUE , 302 ) Both options produce the same result:…
-
10
votes1
answer1527
viewsDifferences between Success and Then Angularjs
So far I’ve been using the success to the Http Promises. Ex: $http.get(/url).success(function(data){ console.log("Sucesso"); }) .error(function(response, status) { console.log("erro " + status); });…