2022 Developer Survey is open! Take survey.

Questions tagged [http]

HyperText Transfer Protocol (HTTP) is an application level network protocol used for the transfer of content on the World Wide Web.

Filter by
Sorted by
Tagged with
-2 votes
0 answers
19 views

Basic authentication used to call a REST API, but how to determine if a wrong password is entered? [closed]

I'm using the following HTTP Basic Authentication with PHP to prompt the user for a username & password which is then passed to a REST API call to start or stop a process. As written this works ...
user avatar
0 votes
2 answers
106 views

Python script for Web scraping

I wrote a Python script for Web scraping of a Website. Please review my code and suggest me any changes or make me aware of my blunders/mistakes?. I wrote the almost same script for other websites ...
user avatar
1 vote
2 answers
59 views

Having trouble deleting multiple queries (PHP, MYSQL)

I'm having trouble making WHERE IN query work, I was only able to make it work as a foreach loop. My payload looks like this: sku[]: BOOK0002 sku[]: BOOK0003 My ...
user avatar
  • 11
0 votes
0 answers
27 views

Chinese listening practice tool

I recently decided to pick up some Go and wanted to rewrite a Python webapp that I wrote as a Chinese listening practice aid. Here's the code I was basing it on. With a bit of luck, a production ...
user avatar
  • 395
1 vote
1 answer
121 views

Better ways to parse the Content-Length from the HTTP header

I have a buffer that contains the HTTP header, which contains the Content-Length string indicating how big the file is that needs to be downloaded. I am looking to ...
user avatar
  • 147
10 votes
2 answers
1k views

Multi-threaded web server serving HTML, images, etc

I have a web server that can send websites, images, mp3 and other things and I was wondering how I could improve the code and make the server more efficient. ...
user avatar
1 vote
2 answers
71 views

Simple server to host simple website page with css

I have created a simple server that host html that has css. Please make sure if ur testing then change the paths relative to ur system in listhell.c in respond_main(..) function. The html file has to ...
user avatar
  • 145
0 votes
1 answer
289 views

Spring boot: better way to handle response and exceptions

I am working on a quite a big Spring Boot web service and I wanted a standardized and simplified way to handle responses and exceptions by following fluent API design. So this is what I did and it ...
user avatar
3 votes
0 answers
36 views

Node.js Dumbserver

Dumbserver, or the simplest workable HTTP server. It is supposed to operate in the 'traditional' way, that is, mapping paths in requests to the directory structure. Why did I write it: I needed a ...
user avatar
  • 571
2 votes
3 answers
128 views

A C++ library that sends and receives data using HTTPS or HTTP

...
user avatar
4 votes
0 answers
269 views

Simple RESTful counting API in Golang

Description This is a simple (and hopefully) RESTful API in Golang that uses Redis. I have next to no prior experience in Golang and absolutely no prior experience with Redis. The API is a simple ...
user avatar
1 vote
1 answer
53 views

A simple wrapper around fetch

I am writing a simple wrapper around fetch. ...
user avatar
  • 275
0 votes
1 answer
48 views

Go Web API for Sending Emails via Contact Form

I've been playing around with Go and finally found a use case for a little web service I could build. It takes JSON data via an HTTP POST request and sends me an email via Mailgun's API (it's used for ...
user avatar
  • 133
2 votes
2 answers
204 views

Getting metadata from MusicBrainz service

I've written a program which does the following things: calls third-party utility to get mp3 file fingerprint asks MusicBrainz IDs from AcoustID service asks metadata from MusicBrainz for each ID I'...
user avatar
1 vote
0 answers
120 views

Command line utility for user data migration from MUBI.com to letterboxd.com

Please make code review for command line utility for user data migration from MUBI.com to letterboxd.com. Utility makes Get HTTP request downloads json-data, parses it and saves as CSV-file. Can be ...
user avatar
  • 232
1 vote
3 answers
2k views

C# Asp.net core middleware for redirecting URLs

I wrote a small middleware for redirecting between WWW URLs. The most important thing that I want to change is to make it super fast. Here's what it is doing: If the host is localhost or mywebsite.com ...
user avatar
2 votes
1 answer
106 views

Modify original JSON few times and post http request

Follow up question from here. I am working on a project where I need to do below things in Python: Take few input parameters like - environmentName, ...
user avatar
  • 169
1 vote
1 answer
51 views

Simple http helper in Go

Can you please share your thoughts on the following simple httphelper in Go? Thanks in advance. I mainly would like to know whether returning a channel of a custom type seems like a good idea and if ...
user avatar
8 votes
1 answer
272 views

Post json using http and verify whether all actions completed successfully or not

I am working on a project where I need to work with http apis and call them using Python language. Below is what I need to do: Take few input parameters like - <...
user avatar
  • 169
2 votes
0 answers
47 views

HTTP Client Skeleton [closed]

I've made a simple winhttp client in C++ and here is kind've the skeleton of the header file. I was thinking of initializing the session once and then using it throughout the rest of my http client ...
user avatar
4 votes
1 answer
446 views

URL parser in C

Title should be self-explenatory. This is a simple URL parser I wrote in C. The function takes a URL from the user and produces a struct that contains the information that can be used to request the ...
user avatar
  • 41
8 votes
2 answers
253 views

Serving a webpage that displays the HTTP request information sent by the client

In order to learn web server programming in Node and JavaScript, I decided to implement a simple web server that only does one thing: Display data of the HTTP request as an HTML table. The actual ...
user avatar
  • 729
3 votes
2 answers
107 views

Minimal, very simple, implementation of an HTTP server for static content, using only core node.js modules

To practice the very basics of node back-end, I'm implementing the most basic server possible for static content, using only the core node modules: http fs path With the following server ...
user avatar
  • 729
2 votes
2 answers
657 views

Get all data from an external and paginated Swagger API using Java / Feign / Spring

I have written the following method that allows me to import from another API all the items stored there using Feign. The only issue is that the external API provides a size limit of 2000 and ...
user avatar
  • 789
4 votes
0 answers
569 views

Parsing HTTP request for webserver implementation

I'm writing a web server from scratch on pure Java in learning purpose. As a part of request handling, I worked on a class to parse HTTP request, I expect from it to be able to do next things: ...
user avatar
2 votes
1 answer
74 views

Part 2: Create or update record via HTTP request

This script was previously reviewed here: Part 1: Create or update record via HTTP request I've made the changes that were suggested by @Reinderien. Now that the code has been significantly refactored,...
user avatar
  • 198
5 votes
1 answer
234 views

Part 1: Create or update record via HTTP request

Update: This is an older version of the question/script. The new version can be found here: Part 2: Create or update record via HTTP request I have an external system that sends an HTTP request to a ...
user avatar
  • 198
2 votes
1 answer
381 views

Part 2: Send HTTP request for each row in Excel table

This script was previously reviewed here: Send HTTP request for each row in Excel table (Part 1) I've made the changes that were suggested in the Code Review answers as well as added a few of my own. ...
user avatar
  • 198
7 votes
2 answers
2k views

Part 1: Send HTTP request for each row in Excel table

Update: This is an older version of the question/script. The new version can be found here: Part 2: Send HTTP request for each row in Excel table I have an Excel spreadsheet where users can batch-...
user avatar
  • 198
2 votes
1 answer
878 views

Deserialise Json and Read Stream twice in C#

So this is a modern implementation of a HTTP client, trying to find a way to optimise/simplify this. Specifically the DeserializeAsync method with the GetStream and the compiler statement for if/debug ...
user avatar
  • 414
1 vote
1 answer
47 views

Promise-based HTTP abstraction layer

I am currently working in a project based on a microservices architecture pattern. Services are wired up by HTTP calls. They eventually call each others for fetching or putting some data. I am ...
user avatar
  • 146
2 votes
0 answers
44 views

Proxy server performance improvements?

fairly new to playing around with proxy servers. Wrote a really simple one with Express to help keep some API keys secret so that my front-end app can query the GitHub API. Definitely feels a bit ...
user avatar
  • 91
4 votes
2 answers
107 views

Quickly throwing together a text-and-button-based client-server web game

With much of the world in lockdown at the moment, my friends and I wanted a way to play our favourite game, Celebrity, over video chat. This seemed like a fun coding project, so I put together a ...
user avatar
  • 188
5 votes
2 answers
878 views

OOP Web-scraper w/ Python and BeautifulSoup

This is my first major web scraping program in python. My code works nonetheless, I'm just not sure if it's the best OOP design. My code is below: ...
user avatar
0 votes
1 answer
46 views

Python code for checking request headers [closed]

I am trying to validate a HTTP REST API request in my python code. It checks for some request headers (X-Foo and X-Bar) and two ...
user avatar
  • 117
3 votes
1 answer
67 views

Handle HTTP and BLE requests

Im implementing and designing a workflow that performs both HTTP and BLE requests. Im having trouble figuring out the best approach to design a service to handle both types of requests, and manage ...
user avatar
  • 45
-1 votes
1 answer
262 views

http router written in Golang

in my jurney to learn Go, I decided to write a simple router which I called it Gouter, which I think it has most of the features in gorilla/mux but in my opinion it's easier to use. Anyway, it ...
user avatar
  • 423
1 vote
0 answers
57 views

Short wrapper for fetch (similar to axios)

I was looking to replace my use of axios with just fetch, but I didn't like how verbose fetch was with regard to handling JSON output (having to have a separate then...
user avatar
3 votes
0 answers
90 views

HTTP download function in Rust (async/await)

Why am I fighting the compiler? - Wrote this, which works, but I feel like I'm breaking every rule in the book: ...
user avatar
  • 503
-2 votes
2 answers
95 views

Episode 1: Mastering code and Testing it [closed]

Once upon a time there was a noob developer who learned it all by himself because he grew up in a nation far behind in IT. I've tried to learn C# for about 5 years, without any improvement over the ...
user avatar
  • 121
1 vote
0 answers
788 views

HTTP Client - Best practices

I've made a HTTP client and would like some tips to improve my code, it's supposed to be built for xamarin forms but should work with any implementation. My goal of this project was to learn more ...
user avatar
  • 414
3 votes
1 answer
409 views

C# REST / Http Client Abstraction

I have a REST library. These are the abstractions. Have I missed anything that a developer would need to use this in a dependency injection / IoC Container scenario? Anything that bothers you about ...
user avatar
6 votes
1 answer
404 views

Read HTTP header from TCP socket

I'm growing a web server in Haskell that interfaces with TCP sockets using network. To read the HTTP header of the client's message, I use the following function: ...
user avatar
2 votes
1 answer
76 views

Modern HTTP-Requests for login/register system

I am working on a login/register system and want the register and log in process as smooth as possible. One way of making it smoother is in my opinion to make a multi-step login/register. What I ...
user avatar
  • 131
2 votes
0 answers
79 views

Retry HttpClient request without handlers

I have a server and client application. In the client application, there are HttpRequestException class exceptions on requests. As it seems to me - these exceptions happen in isolated cases and not ...
user avatar
2 votes
1 answer
199 views

Easily interacting with two external apis

Recently I rewrote some methods/functions written by a previous developer mostly due to the fact that the previous implementation overdid the whole 'OO' thing, and used inheritance inappropriately. ...
user avatar
2 votes
0 answers
666 views

Seekable HTTP response stream wrapper

I created this wrapper to use together with HttpClient streams and ZipArchive. ZipArchive ...
user avatar
  • 309
4 votes
1 answer
163 views

Implement HTTP server using libevent

...
user avatar
  • 475
2 votes
0 answers
421 views

Stream JSON from Azure Cosmos DB to browser in Web API

I have an HTTP endpoint for returning data directly from Azure Cosmos DB. The endpoint is basically a database access point (this seems like a common case). Since I'm returning the data unmodified, ...
user avatar
  • 133
2 votes
0 answers
34 views

Refactoring the Go HTTP API code/flow/structure

This app loads application specific global configs and starts http server so that it is ready to serve API requests. While structuring and coding, I've followed some "best" practises either from the ...
user avatar
  • 300

1
2 3 4 5
9