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
1
vote
0answers
7 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 ...
2
votes
2answers
43 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 ...
4
votes
0answers
29 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: ...
2
votes
1answer
60 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,...
5
votes
1answer
122 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 ...
2
votes
1answer
38 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. ...
7
votes
2answers
206 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-...
2
votes
1answer
103 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 ...
1
vote
1answer
42 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 ...
1
vote
0answers
23 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 ...
4
votes
1answer
749 views

Node.js http retry do while mechanism

I have implemented a simple do/while loop to handle a http request to a third-party. I don’t know when the data I receive will have elements in its array so I retry up to 10 times until the array ...
4
votes
2answers
92 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 ...
1
vote
0answers
14 views

Maka cached Ajax call more robust and solving race conditions

I beem preparing for a front end interview and been practicing making Ajax calls using Vanila Javascript. Here is the demo https://codesandbox.io/s/search-with-customize-catch-ei81f?file=/src/index....
5
votes
2answers
437 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: ...
0
votes
0answers
35 views

Fetch HTTP wrapper and API

I have written a basic HTTP wrapper around the fetch. Then a API service which add some default options/parameters. the idea is ...
0
votes
1answer
38 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 ...
6
votes
1answer
200 views

Tokenizing texts from Gutenberg archive for analysis

I am writing a program to analyze books from the Gutenberg archive. The program takes the title and URL and finds the text and downloads it. Then it goes through the text and tokenizes it. Here is the ...
3
votes
1answer
47 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 ...
-1
votes
1answer
74 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 ...
1
vote
0answers
50 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...
3
votes
0answers
66 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: ...
-2
votes
2answers
88 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 ...
1
vote
0answers
151 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 ...
4
votes
1answer
144 views

Download NASA images to use as Windows wallpaper

I made myself a simple script (Batch/JScript) that download a pic from a blog (APOD) & set it as wallpaper. ...
2
votes
1answer
105 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 ...
5
votes
2answers
475 views

reusing Body in http.Requests (goproxy)

Goproxy is a Go package implementing an HTTP proxy. I am using it to store requests from a client (eg: a web browser) for further processing. In an ...
0
votes
1answer
91 views

Downloading and reading data in go

I am trying to experiment with golang. This code spins off two Go routines: one to download data and another to read from the body. Both go threads are synced by the data channel. I have two ...
1
vote
2answers
138 views

Filter for logging http request parameters

I have written a filter that intercepts http calls and logs request parameters. ...
6
votes
1answer
146 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: ...
7
votes
1answer
194 views

Basic Python HTTP Server

It's an extremely simply HTTP server in Python using the socket library, and a few others to get the MIME type, etc... I've also avoided the ../../ vulnerability, ...
2
votes
1answer
196 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. ...
2
votes
1answer
69 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 ...
8
votes
3answers
2k views

Very basic C++ HTTP Parser

I was bored, so I decided to write a very basic HTTP Request/Response parser in C++. Some Notes: This isn't meant to be a complete implementation of the HTTP protocol This isn't meant to be the ...
2
votes
0answers
199 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, ...
1
vote
1answer
45 views

Python classes to grab HTTP response from website entities

I am trying to implement a parent WebContent class and child classes to grab HTTP responses from the actual website entities. There are highlevel codes below and I ...
2
votes
0answers
43 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 ...
2
votes
0answers
248 views

Seekable HTTP response stream wrapper

I created this wrapper to use together with HttpClient streams and ZipArchive. ZipArchive ...
4
votes
1answer
80 views
3
votes
2answers
134 views

JSON fetcher for Eclipse plugin

This is a client module of an Eclipse plugin. I am planning to use this code as a "good exception handling" code example in one of my papers. How does it look? ...
2
votes
0answers
28 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 ...
3
votes
2answers
3k views

Timeout implementation of fetch

After doing some research on google i didn't find any good info on how to implement timeout with fetch (looks like there are multiple proposals but that's about it so nothing has implemented it). For ...
4
votes
1answer
65 views

Basic network layer for a JSON API client

Just looking for some feedback/ways to improve this basic networking layer written in Swift. I'm still learning, please elaborate with as much detail as possible. ...
4
votes
2answers
1k views

Searching the Foursquare API with Python

I'd like some feedback on the readability, style, and potential problems or issues. foursquare.py ...
5
votes
1answer
97 views

Download and concatenate text files from multiple API endpoints

Background Chronicling America is an archive of digitized US newspapers hosted by the Library of Congress. The site allows programmatic access of its resources through an API, one part of which is ...
7
votes
1answer
147 views

BingWallpapers: Fetches and applies the image of the day from Bing as the wallpaper

I have written a small desktop program nabeelomer/BingWallpapers in Haskell. This is my first time writing Haskell. I was wondering how I can make the code use more functional programming features/...
4
votes
1answer
67 views

Python program that gets basic information on a Github user

I've created a basic Python CLI script, which takes a Github username, and returns some basic information associated with said username. I use the requests for HTTP requests (I'm new to this area) and ...
8
votes
3answers
47k views

HttpURLConnection response code handling

This snippet from a downloader callable handles HTTP status codes. I need critique on both the style (for or do-while loop ...
1
vote
1answer
52 views

HTTP status monitoring

I am fairly new to programming. I am writing a script which gets URLs and parameters through a config and makes http requests to check status, finally push a json string to Open-falcon server. I am ...
2
votes
0answers
67 views

Apache reverse proxy security configuration

Could someone share some light and check if this is okay for apache httpd security/good standards? I'm using apache httpd to call my Node.js app that is running with Express and also configuring SSL. ...
2
votes
1answer
114 views

Using Curl/Post to execute a HTTP request

I have a loop in a php file to HTTP_Request Server Via CURL->POST. But I don't know if I'm missing any security considerations. Also, is there a better way to perform this http request? ...

1
2 3 4 5
8