Skip to main content

Questions tagged [http]

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

2 votes
5 answers
2k views

Pattern Matching on Request Body for Routing an HTTP Request

In an HTTP application, I think about routing requests based not only on the path, but also based on the request body. For an example, think about the following two different body schemas for a PUT ...
Jonathan Herrera's user avatar
0 votes
1 answer
157 views

How to handle different json response for the same api rest endpoint and different http status

I have an endpoint similar to GET ../produtcs/123 where 123 stands for an ID. The REST service response with either status 200 and a json object A {"deliveryData": {"status": 200, ...
surfmuggle's user avatar
0 votes
1 answer
128 views

Architectural decision regarding at-most-once semantics cron jobs in distributed systems

please note that while I refer to a specific web application framework in the following, the problem also arises with most other web application frameworks I know so please don't be afraid to reply ...
dfsg76's user avatar
  • 109
0 votes
1 answer
227 views

POST and PATCH for a nested resource in REST API

One post can have many comments. How can I design REST API urls for HTTP POST and HTTP PATCH for comments. My idea is to have the following endpoints: HTTP GET: /posts/{postId}/comments HTTP GET (all ...
Aleksander Chelpski's user avatar
0 votes
1 answer
189 views

How to view the exact raw HTTP request on Postman? [closed]

When I'm sending a request, the raw log looks something like this: GET / HTTP/1.1 User-Agent: PostmanRuntime/7.36.3 Accept: */* Cache-Control: no-cache Postman-Token: 3d4eba45-388c-462c-a174-...
DevelBase2's user avatar
1 vote
3 answers
244 views

Should this request return a status of 404 or a different status

We have an API that allows clients to POST some request which takes some time to complete, so the API simply places it on a message queue and returns a 202 (Accepted) and a new GUID in the body. The ...
JoelFan's user avatar
  • 7,091
-2 votes
3 answers
251 views

Why does the HTTP protcol support multiple methods?

This is a question which I have had in the back of my mind for a significant length of time, but never found an answer to, and never thought to directly ask - until today. I am interested to ...
user3728501's user avatar
-2 votes
1 answer
345 views

Go’s answer to c10k problem

I have few questions on the go's answer to c10K problem. How is an event loop different from the network poller described in this blog? I see a striking similarity between waiting threads and waiting ...
ProgramCpp's user avatar
2 votes
1 answer
323 views

What really is a "web server" in relation to popular frameworks like Flask, Node.js, Apache?

In Flask you can run a "webserver". Well really it's a "WSGI Server". Well really you shouldn't be using core server features like serving files through HTTP at all, you should be ...
Leftover Salad's user avatar
0 votes
6 answers
548 views

Can a web server accept a plain test file upload without additional server side scripting?

I've been trying for days to upload plain text files to a web server (both IIS and NGINX) via HTTP PUT/POST, from a C# desktop app, unsuccessfully However, I'm no further along. I have had various ...
mountainred's user avatar
0 votes
1 answer
153 views

When to use PUT vs POST while calling APIs?

GIST: PUT is idempotent PUT is used for updating/creating a resource. POST isn't idempotent. POST is used for creating a resource. So, I'm wondering what should I use in this case and why? I want to ...
tuck_y's user avatar
  • 181
0 votes
1 answer
213 views

HTTP redirect vs JS redirect

I have a Svelte web app exclusively for internal use, so there is no main landing page or registration, as accounts need to be created by the admin. Since the main page has no function as an ...
Jeremy Meadows's user avatar
0 votes
3 answers
509 views

Is it appropriate to use PUT for resources when the id is deterministically derived from immutable properties?

I'm working with a RESTful API where a POST operation is used to create a user. A required field, which could be an email or a unique user nickname, is unique across the system. The response to this ...
Sergey Kolesnik's user avatar
0 votes
3 answers
1k views

How to combine epoll + multithreading in an HTTP server

I'm building an HTTP server in C using epoll and pthread. The idea is to have an event loop in the main thread monitoring file descriptor and a thread pool to handle computationally-expensive ...
Richard H. Nguyen's user avatar
-4 votes
1 answer
287 views

Web applications, cookies and GDPR

... or technology stack for compliant web applications. GDPR among other includes cookies usage defining four cookie types: strictly necessary cookies , preferences cookies, statistics cookies, ...
user avatar

15 30 50 per page
1
2 3 4 5
26