Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [http]

HyperText Transfer Protocol - a textual system for representing web requests and replies.

-2
votes
2answers
63 views

REST API acceptable design flexibility

I design and works on lot of projects involves REST APIs. But one question is always occur to me if it is acceptable way to do REST. So according to REST manuals online, REST is build upon two major ...
0
votes
1answer
24 views

Retrieving JSON and image representation of a resource

I am developing a RESTful API designed primarily (but not exclusively) for consumption by a web application. For the purposes of this question, the API is a set of GET endpoints. The main endpoint is /...
1
vote
1answer
74 views

How does a party receiving frames under HTTP 2.0 know the order?

The frames are sent in multiplexed fashion and have a stream id. The receiver re arranges frames with the same stream id but what happens if an older frame arrives first? Is there a concept of ...
-2
votes
0answers
41 views

design java library to make HTTP request

I want to create a jar library to be used in another project (Concurrent access), this library aims to run multiple tasks each task is an HTTP request. I create a class for each Task, each class ...
2
votes
3answers
152 views

can two web browser tabs be distinguished in a single-page application?

motivation and context I am designing and implementing the web interface of my bismon server program (a research prototype; in a few words: an orthogonally persistent, reflexive, homoiconic, ...
1
vote
1answer
48 views

Converting HTTP requests to MQTT and back again for smart home integration

We have an already running MQTT setup for communication between smart home devices and remote server, for remotely controlling the devices. Now we want to integrate our devices with Google Home and ...
0
votes
0answers
46 views

Two Web clients and Java server (HTTP and Websockets)

I have 3 software components of a Web Application: 1. JS-client application 1 (JSApp1) 2. Java Spring (REST and Websockets) server app (SRV) 3. JS-client application 2 (JSApp2) My current task is to ...
0
votes
0answers
61 views

HTTP Method and REST URL for Returning Data that May Be Saved

My application has a grid with a list of Car objects from a third party system [{id: 1, make: "Ford", model: "Focus", ...},...] The user can select a Car and use its data (after some transformation)...
-1
votes
1answer
68 views

How to determine the application used on top of TCP?

I am currently implementing a TCP Proxy Server. The huge problem I have right now is that, based on the clients' TCP data, I am trying to determine whether the client is making an HTTP, FTP or SMTP ...
2
votes
3answers
80 views

Permissive vs. Strict API Message validation

We had a interesting debate today over what our REST API should default to doing when validating a request body where unexpected fields are present. I think we ended the conversation in a good place, ...
0
votes
0answers
34 views

HTTP/REST and chained processing protocol/convention

Is there a protocol or a convention that supports REST (ok, maybe we should use HTTP here instead) processing chain and some neat features to help with that? Let me explain what I mean. Let's assume ...
0
votes
2answers
53 views

How do job queues return results to UI?

I am working on an app that will run queries and return results to UI. However, these queries can take a long time to finish so I should not wait for the result. As far as I know, people use task ...
1
vote
2answers
78 views

API design - indicate that results were truncated

For reasons, my search endpoint returns a maximum of 50 results. I'm struggling with how best to tell the caller that their results were limited to 50. The best I've come up with is returning some ...
0
votes
0answers
85 views

Separate server for Flask-SocketIO chat functionality?

I currently have a Flask application which acts as the backend for my website. I intend to add live private chat functionality to my website using Flask-SocketIO. I was wondering, is it better to ...
0
votes
2answers
52 views

Should I put request context in path or in headers?

I'm designing a system that will Act as proxy calling a service on a back-end in context of user and his session Manage sessions for users on multiple back-ends I will expose the system over HTTP. ...
0
votes
1answer
36 views

Optimising network data usage in vehicle tracker

I'm currently working on an Android application that broadcasts the location of the device every 5 seconds. Pseudo showing current app process: deviceLocation = getLocation() if (hasChanged(...
10
votes
5answers
2k views

What should I do when optimistic locking doesn't work?

I have this following scenario: A user makes a GET request to /projects/1 and receives an ETag. The user makes a PUT request to /projects/1 with the ETag from step #1. The user makes another PUT ...
1
vote
2answers
229 views

How to handle “Optimistic Locking” on a collection with ETag headers?

Consider endpoint /projects that returns a list of projects with the following headers: HTTP/1.1 200 OK Etag: "superEtag" The etag value represents a hash of the entire collection and it does not ...
4
votes
2answers
182 views

HTTP response header to indicate request was forwarded to another server by reverse proxy

Given a system of services and a reverse proxy, such that requests may either be conclusively processed by the proxy or ultimately handled by any of the services behind the proxy. Consideration has ...
6
votes
3answers
421 views

What reasons are there AGAINST using only POST HTTP verb in an API?

I am researching before starting to work on an API for a web-service I am building. The goal is to be very quick and easy to adapt and use for other developers but fairly hidden for clients using a ...
2
votes
2answers
303 views

How to integration test server failures (http 500)

Like in the title: how do you integration-test server failures that return 500 HTTP responses? For example: There's a server with a /save endpoint that accepts files on POST and saves it into the ...
-1
votes
1answer
187 views

Why not put TLS certificate in DNS responses?

The security of a TLS connection relies on trusting the CA's certificate, which in turn, is usually actually a proof of DNS entry ownership. Even though the server operator may request a certificate ...
0
votes
1answer
102 views

Professionalism of implementing the HTTP “QUERY” method in an API

Some years ago, the w3c documented a proposal for a method called QUERY, where query information may be passed in as the request body rather than on the request line in query parameters. You can see ...
0
votes
1answer
61 views

How to route/implement port forwarding with AWS/Apache web server (httpd) with a Node.JS app on port 3000?

I'm trying to understand this and having a hard time. I usually use Ubuntu server, with Apache2, and this time I am not. So I'm a bit out of my element. I'm also a software developer and I don't do ...
3
votes
2answers
75 views

HTTP Methods - what about only using POST for Ajax calls?

You can find whole articles theorizing when you should use what METHOD in what edge case. It mostly comes down to this; every action needs to be simplified to in just four flavours (GET, POST, PUT, ...
-3
votes
1answer
32 views

Disable recieving messages from queue remotly

I have a CRUD like service which have REST HTTP API. This service have two instances - only one recieving request at time. If first instance starts throwing exceptions or slowing down we change load ...
3
votes
2answers
124 views

Proper URL structure in REST API to change status of one particular record

What's the proper URL structure in REST API for changing state of one particular record (e.g. change from "new" to "processed"). Now I work with this URL without request body: PATCH /employees/123/...
1
vote
2answers
338 views

What happen if we never dispose HttpClient, .Net C#?

I'm working on a windows service. Code of windows service is very simple but it has a strange manner! In windows service I should call a WebApi each 20 seconds and save the result in a SQL Database I'...
49
votes
10answers
10k views

What should be the http status code for “Service not available in your area” error?

Our service is in 5 cities right now. If someone tries to call our service API from any other city, we want to throw this error Service not available in your area. The question is, what is the ...
1
vote
1answer
77 views

Design: HTTP and Websockets working together

I'm at a bit of crossroads here and I wanted to ask the opinion of the community. I am creating a chat application for our company. Now, like every chat application out there, the messages are saved ...
0
votes
0answers
34 views

Data exchange between Chromium and a game client

I am creating a lightweight UI web app that will be embedded into a game client (PC) via chromium. This web app will be able to do a few simple actions and will communicate with an external REST API ...
1
vote
2answers
79 views

How much to log with 400 or 500 HTTP resonses?

In light of the recent Twitter logging bug, I've been thinking about something with my own web-app: how much information should I log in the event of a 400 or 500? I obviously don't want to be logging ...
0
votes
0answers
297 views

What kind of information I should pass through a HTTP Header?

I was trying to find if there is some kind of reference about what type of informations are important to be passed on the HTTP Header. I understand that some information seems natural to be there, ...
2
votes
5answers
942 views

API “initialize” method: POST or GET?

We faced an issue with an API "init" method, and trying to understand if we must use GET or POST http method in context of REST. Preconditions: SPA on the frontend which communicates with our backend ...
1
vote
0answers
336 views

Are AJAX calls fully replaceable by requests sent via WebSockets?

I am redeveloping an application with the aim of going along with the more modern techniques. That is how I came across Socket.io, which I integrated with express.js. I implemented live searching ...
0
votes
1answer
133 views

Is a URC (Uniform Resource Citation) synonymous with a Query String or Url Parameters?

Reading this: https://renenyffenegger.ch/notes/development/web/URI-URL-URN-IRI-URC URCs provide a set of attribute/value pairs that describe properties of URIs like authorship, publisher, ...
0
votes
1answer
211 views

Web page accessing local system via localhost HTTP API

I have seen this pattern that allows web pages to interact with local system resources through a HTTP interface and I have a couple questions about it: What is this pattern called? What ...
2
votes
1answer
125 views

Rest API for supporting dual listbox

I'm trying to figure out what my API route and HTTP method should be for supporting a dual list box (e.g. http://geodan.github.io/duallistbox/sample-100.html) Say, I have a collection, GET /employees ...
0
votes
0answers
363 views

Design of api for spa applications

I have application for configuring e-commerce website (for example routing, page alliases, ordering, etc.). In old old times in server rendered applications I would have api like: POST/api/things/1/...
1
vote
0answers
128 views

CORS headers for non-200 HTTP responses

I'm specifying an API for a REST service. The REST service will be primarily accessed by web browsers using XHR requests running code hosted from remote origins. Therefore, I'll need to add CORS ...
0
votes
1answer
244 views

HTTP response code for proxy with expired connection resource

I am building a service which acts as a proxy to third party data providers for the end-user. My service uses tokens for authorization and if the user does not have a valid token it responds with 401 ...
7
votes
2answers
1k views

Can a caller abort an execution of code invoked by HTTP request?

A third party that is going to make HTTP requests to the API that I'm building, requires that the API responds in less than one second. My question is, do they have a way (literally any way, within ...
2
votes
1answer
161 views

Software architecture of IoT hardware controller program with embedded HTTP server

Just trying to design an architecture/class relations for my current C++ project in the IoT field. The program itself (controller) controls various hardware via an arm-based device. I intend to use ...
2
votes
1answer
361 views

Not prohibited, but disallowed — which http error code should I return?

I know that if user is forbidden in an admin's area, I should return 401 or 403 status error code. However, what I want to prohibit an admin for accessing a user's dashboard also? An admin has its own ...
0
votes
1answer
175 views

is the term “payload” is used exclusively in request?

Is the term "payload" used exclusively for the payload of (let's say http) request or it may be used to describe the useful information in the response of a request? If its used for both payloads (...
-2
votes
3answers
192 views

Is authentication equally important to encryption?

I am thinking how to implement the login of a new web application and as I search the net, most search result as about authentication instead of encryption. Assumption: The web application is ...
0
votes
1answer
307 views

Replacing HTTP with plain TCP in a client-server application

I'm building a small application composed of: Client (command-line) Business logic (remote server) It's a simple game of tick-tack-toe where the client sends information to the server about which ...
3
votes
1answer
70 views

Should a push hold data or make the receiver trigger an API call?

With WebSockets, when clients should be notified that data changed, I've seen two approaches: the server pushes the data modifications directly within the push; or the server pushes no data, and the ...
-4
votes
4answers
502 views

Is get and post interchangeable?

I know that there are some differences between GET and POST, like descriped in this post on StackOverflow. But what I cannot figure out is, are they interchangable, assuming that you change your code ...
1
vote
1answer
214 views

Split requests between different server applications

I currently have a web server running apache with multiple sites on it using virtual hosts. I want to add a service to my server that is using nodejs but I want it to be accessible under the same ...