Stack Exchange Network

Stack Exchange network consists of 175 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.

1
vote
1answer
53 views

Is it normal approch get all items after post new item?

Problem description: Parent view displays a list of items. This view has button add a new item to list wich open modal for creating a new item. Two approaches how to do that: 1) POST Request -> ...
1
vote
1answer
165 views

Currently serving big file (1.2GB) using HTTP/1.1, will HTTP/2 give better performance?

I have the single big file (1.2GB+) hosted on the server to download currently served using HTTP/1.1. We are exploring if we can move to HTTP/2 for better performance and security. All the places on ...
1
vote
1answer
34 views

Client-side XHR request, which IP does the endpoint read?

Assume a Javascript plugin, for a developer, that's included on their website. <script src="https://external.com/plugin.js"></script> The plugin makes a XHR request to a 3rd party ...
1
vote
1answer
282 views

How to structure your URIs?

I am making a web UI and an HTTP API for editing JSON documents in collaboration (role and versioning system). There are several types of JSON documents. Each type is described by a JSON schema, let'...
1
vote
1answer
35 views

RFC2616 (HTTP/1.1) client vs user agent (sec 1.3)

In Section 1.3 Terminology, RFC2616 (HTTP/1.1) says: client: A program that establishes connections for the purpose of sending requests. user agent: The client which initiates a ...
0
votes
0answers
14 views

W3C Reporting API - Mitigate spam/forged reports

I'm looking into the W3C Reporting API, which enables websites to instruct the client (browser) to send reports about: browser crashes, network errors, browser interventions etc. ouside the JS ...
0
votes
1answer
71 views

REST-like HTTP POST request with JSON

I am coding a poof-of-concept throw-away GCC plugin (see this for more context) which would use the HTTP 1.1 protocol to interact with my Bismon (GPLv3+ code on github, but unreleased; draft technical ...
-1
votes
2answers
47 views

Implementing http patch using less number of possible cases

Maybe this is stupid question but if I implement http patch, is there no good way to reduce the number of possible cases without exploding into a large number (2^n) of different cases depending on ...
0
votes
2answers
156 views

handle server shutdown while serving http request

Scenario : The server is in middle of processing a http request and the server shuts down. There are multiple points till where the code has executed. How are such cases typically handled ?. A typical ...
1
vote
1answer
61 views

Batching CRUD of individual models that need to be linked

I have a few models which need to be linked together during a workflow on my webapp and I'm having trouble thinking of a nice abstraction for the api. They are represented as individual constructs on ...
-2
votes
1answer
38 views

over come HTTP client time out issue

I have an api end point which receives some parameters and process them returns a csv file. But the processing time may take more than 15 seconds. My server has build in timeout and some client ...
0
votes
1answer
142 views

When can an HTTP header have a non-string binary value?

The Browser Extensions Standard (which is based on the Chrome Extension API) includes a webRequest API with methods onBeforeSendHeaders and onHeadersReceived, allowing a browser extension to see and ...
-2
votes
2answers
69 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
42 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
76 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
3answers
236 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
79 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
56 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
67 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
71 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
114 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
36 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
78 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
88 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
113 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
57 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
48 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
4answers
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 ...
2
votes
2answers
398 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
207 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 ...
7
votes
3answers
453 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
592 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 ...
0
votes
1answer
204 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
101 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
79 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
33 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
169 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
485 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'...
50
votes
10answers
11k 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
85 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 ...
1
vote
2answers
94 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
482 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
1k 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
390 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
158 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
232 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
134 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 ...
1
vote
0answers
136 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
270 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 ...