Questions tagged [http-protocols]

The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia information systems. It is a protocol to transfer or exchange hyper text

The Hypertext Transfer Protocol is an application-level protocol for distributed, collaborative, hypermedia information systems. It is a stateless protocol that can be used for name servers and distributed object management systems, through extension of its request methods, error codes and headers.

HTTP concepts include (as the Hypertext part of the name implies) the idea that files can contain references to other files whose selection will elicit additional transfer requests. Any Web server machine contains, in addition to the Web page files it can serve, an HTTP daemon, a program that is designed to wait for HTTP requests and handle them when they arrive. For example, when you enter a URL

enter image description here

in your browser, this actually sends an HTTP command to the Web server directing it to fetch and transmit the requested Web page.

HTTP has been in use since 1990.

There are three basic features that make HTTP a simple but powerful protocol:

  • HTTP is connectionless: The HTTP client, i.e., a browser initiates an HTTP request and after a request is made, the client disconnects from the server and waits for a response. The server processes the request and re-establishes the connection with the client to send a response back.

  • HTTP is media independent: It means, any type of data can be sent by HTTP as long as both the client and the server know how to handle the data content. It is required for the client as well as the server to specify the content type using appropriate MIME-type.

  • HTTP is stateless: As mentioned above, HTTP is connectionless and it is a direct result of HTTP being a stateless protocol. The server and client are aware of each other only during a current request. Afterwards, both of them forget about each other. Due to this nature of the protocol, neither the client nor the browser can retain information between different requests across the web pages.

More reading : https://www.w3.org/Protocols/rfc2616/rfc2616.html
Image Reference : http://code.tutsplus.com

54 questions
1
vote
1 answer

Android how to reuse Socket?

how to reuse TCP Socket connection(possible setReuseAddress(true), but not work for me) for download multiple files from Server(Apache, HTTPD) in on connection without disconnect(and connect again). My code below.. public class ClientThread…
Andranik
  • 21
  • 2
  • 6
1
vote
1 answer

Android Socket download multiple files fired?

I want to download multiple images from server. I open socket and download first image and when I want download second image in this socket, download not proceed, socket are closed. My code below... public class ClientThread implements Runnable { …
Andranik
  • 21
  • 2
  • 6
0
votes
1 answer

API request gets error with Postman, different behavior with curl

Windows 11 I'm attempting what should be a pedestrian API request, but I'm getting an error in Postman (which might be a Postman bug). The API call is possible because it runs on an Android app that logs the JSON request and response (but no other…
Bob
  • 11
  • 5
0
votes
0 answers

What is the protocol (GET, POST, etc) to be used that takes in form data to respond with other data?

I am working with a backend server and I am wondering what kind of request is ideal for processing and sending data based on an array that is being passed in the request. Note this array does not have a specific size, and ideally I would have liked…
Van Wilder
  • 444
  • 4
  • 14
0
votes
1 answer

Restrict HTTP request based on HTTP Protocol in ASP.NET Core

I want to restrict the HTTP request based on the HTTP request protocol lower than 2.0 in ASP.NET Core. Can we add any policy in the startup.cs file that will restrict the HTTP request based on the HTTP protocol? Thanks
Saurabh Soni
  • 325
  • 3
  • 11
0
votes
1 answer

Is trailers frame after data frame possible in HTTP/2?

Is it possible in HTTP/2 that a data frame is received with END_STREAM flag, and later a trailers frame will be received? In other words, will a frame with END_STREAM also indicate that no other frame will be sent? Also, must a trailers frame (Which…
Ohad
  • 183
  • 3
  • 12
0
votes
1 answer

Is the HTTP header `Set-Cookie: foobar` setting the name or the value of the cookie?

It's not a question about sense but about specification. A HTTP cookie must be set like Set-Cookie: [; ][; ] cookieValue is recommended to be set as = but can be a single value without an equal sign,…
codekandis
  • 712
  • 1
  • 11
  • 22
0
votes
2 answers

Is Content-Security-Policy header applicable only for text/html Content-Type?

From the OWASP's website https://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.html: Send a Content-Security-Policy HTTP response header from your web server. Content-Security-Policy: ... Using a header is the preferred…
0
votes
1 answer

Open a all http links from Windows in my UWP App

I am making a UWP app which opens all the http/https protocol links clicked in the Windows. In short it's acts same as a Default Browser. I used the following to associate with http/https protocols
Chanakya3721
  • 1
  • 1
  • 3
0
votes
1 answer

protocol error when connecting to websocket in NodeJS

So I have successfully run this code from an open source directory in python but I am trying to convert it to JavaScript for my NodeJS app and am having some trouble with the following output when I try to run the code. session generated…
PaulRydberg
  • 51
  • 1
  • 3
0
votes
0 answers

How to take the bearer token which is specific to role using http protocol

I'm trying to automate the APIs which is implemented as part of portal UI solution. Here Authorization happens on role level. In UI, role is decided by selecting one of the role's radio button and click on login. And I can get the bearer token for…
0
votes
2 answers

Illegal assignment from System.JSONParser to JsonParser

In JsnoToApex class I try to GET JSON file from https://openweathermap.org/current. When I try to parse JSON.CreateParses I get these error: Illegal assignment from System.JSONParser to JsonParser I try to make API that show weather in…
0
votes
1 answer

customheaders in web.config file

How can i add entities/parameters into my asp.net mvc application. I want to allow cors to send ajax-requests into a database via asp.net webservice. Does anyone have experience fixing this?
0
votes
1 answer

REST for soft delete and recovering soft deleted resources is limited

This is not much a technical question but more a reflexion about the subject. REST have democtratized a good way of serving resources using HTTP protocols and let developper do the cleanest project by splitting resources and user interface (back-end…
Anwar
  • 4,162
  • 4
  • 41
  • 62
0
votes
0 answers

How to properly manage HTTP connection?

I am wondering how to properly manage the following HTTP response considering the file I am sending to the client contains other linked files representing future HTTP requests. I know that I can close the PrintWriter which will indicate to the…
Truman Purnell
  • 253
  • 3
  • 9