Questions tagged [nanohttpd]

NanoHttpd is a light-weight HTTP server designed for embedding in other applications. NanoHttpd has been released under a Modified BSD licence.

The first version of NanoHttpd was published in 2003. Originally, its author was looking for:

"a small enough, embeddable and easily modifiable HTTP server that I could just copy and paste into my other Java projects."

Later, another team took the project and fixed a number of bugs, moved the build to maven and pulled out the samples from the runtime JAR to further slim it down.

The two projects pooled resources in early 2013, merging code-bases, to better support the user base and reduce confusion over why two NanoHttpd projects existed.

You can view the project on GitHub: https://github.com/NanoHttpd/nanohttpd.

247 questions
0
votes
0 answers

Android NanoHttpd serve endless stream

I`m trying to serve stream with latest (2.3.1) NanoHttpd. Here is code for the server: public class Server extends NanoHTTPD { PipedInputStream in; public void setStream(final PipedInputStream in) { this.in = in; } public Server() throws…
LionisIAm
  • 751
  • 3
  • 17
0
votes
0 answers

nanohttpd server static hostName

I need answer for this question Create Remote HttpServer using nanoHttpd I am creating a httpserver using NanoHttpd library. When I am running it on local it is working fine. but when i am trying to create httpserver using Hostname.This is giving…
Amin Pinjari
  • 2,129
  • 3
  • 25
  • 53
0
votes
0 answers

Send data from a client (computer) to an Android Web Server

I am using the NanoHTTPD Android App to create a Web Server in an Android APP. In this app, the client connect to the server using the smartphone IP. I created an index.html with a textarea, so the user could write words on the web page. I was…
Viclpk
  • 3
  • 1
  • 5
0
votes
0 answers

How can I make a browser not cache URL when I use NanoHTTPD?

When I visit http://129.0.1.23/ for the first time in a browser, the function DoSomething() will be launched and URL will be redirect to http://129.0.1.23/index.html?id=10&name=jack When I visit http://129.0.1.23/ again, the function DoSomething()…
HelloCW
  • 843
  • 22
  • 125
  • 310
0
votes
0 answers

Always running webserver on android

I want to switch on the display (and do other stuff like showing some information) of my android tablet via an external command. My solution was to start a webserver on the tablet, open a webpage and then the display should be switched on. This…
Vader
  • 191
  • 8
0
votes
0 answers

Android M OS, not able to play large video using Nanohttpd streaming

My Code is getting successfully executed below M devices. But on M onward devices it always shows Video cant be played. I debugged the code and found that RANGE is not getting properly set. So when execution comes to serve method it gets null range.…
0
votes
0 answers

Why will session.parseBody() function cause null error when I lanuch it for the second time in Android?

I use NanoHTTPD as web server in my Android App, it's OK when I lanuch session.parseBody() for the first time. But it cause null error when I lanuch the session.parseBody() function for the second time,why? Is there some bugs in the function…
HelloCW
  • 843
  • 22
  • 125
  • 310
0
votes
1 answer

NanoHTTP server update response

I try to run a server from my android app with nanoHTTP. My aim is that everybody connected to the same network as the app can access a html webpage. So far this is my NanoHttp-server-class: private class MyHTTPD extends NanoHTTPD { public…
Luis
  • 71
  • 9
0
votes
3 answers

Cordova version 6.4.0 - how to install httpd plugin?

How do I add the plugin CorHttpd in my cordova project? What is the command ? https://github.com/floatinghotpot/cordova-httpd in this link, they says: How to use CorHttpd: Add the plugin to your cordova project: I tried: cordova plugin add…
Akash Chatterjee
  • 181
  • 1
  • 3
  • 6
0
votes
1 answer

Launch localhost in a browser from Android app without https://

I have a nanoHttpd server in my app. After starting the server, if I manually go to the browser and type in localhost:3000/index.html, it works fine. But when I launch the browser from the app with https://localhost:3000/index.html. I see that it…
0
votes
0 answers

NanoHttpd send binary response

I'm working on a project using creating a game server, the game uses HTTP to communicate back and forth so I require to be able to send binary data as a HTTP response. Preferably I'd like access to a DataOutputStream object to write to however I…
Reddy360
  • 11
  • 1
0
votes
1 answer

NanoHTTPD - Cannot access Response class

I'm following this post on SO because I want to handle POST requests with NanoHTTPD. When I put it into my MainActivity class in Android Studio, it gives me an…
Mingle Li
  • 1,322
  • 1
  • 15
  • 39
0
votes
1 answer

Uploading file to nanoHttpd server Android

How can I retrieve POST parameters in NanoHttpd Serve method. This is my html form bellow
" "+
Alexander
  • 333
  • 3
  • 17
0
votes
0 answers

How can I post all selected items to web server when I use NanoHTTPD in Android?

I use NanoHTTPD as web server in my android, the following content is generated and I can browse the html in Firefox. I hope to delete all selected items, I don't know how to write jQuery or JavaScript code to post the file names of all selected…
HelloCW
  • 843
  • 22
  • 125
  • 310
0
votes
0 answers

Stream video from internet via nanoHTTPd in android

Right now i am streaming local files using nanoHTTPd server it working fine. public Response serve(String uri, Method method, Map header, Map parameters, …
Jeggu
  • 569
  • 2
  • 10
  • 26