HTTPTest app beta release
Michael Gerbracht (180) 104 posts |
I have written a small HTTPTest app which allows you to send and receive HTTP/HTTPS requests. I guess it is mostly interesting for developers but may also be usefull for controlling smart home devices if they have a http api. It uses the HTTPLib from Chris Mahoney and is basically a frontend for it. Main features are: It is still beta because there is a zero pain error when sending a request but I can’t find the error in my code. Since this is my first app written in C any help is welcome. You can download it from here – sources (DDE) are included. |
Julie Stamp (8365) 474 posts |
Looks handy :-) |
Julie Stamp (8365) 474 posts |
In
to OSLib doesn’t use your user mode stack in fact, so the response string isn’t overwritten before However, if you want to be safer, and perhaps simpler, you could go
As for your ZeroPain, that’s caused by httplib. The ZeroPain happens if you have The reason is that when you call
it goes
Notice that in the else clause either of I hope that helps. 1 The first line allocates 65 bytes on the stack and then copies the string literal there from your read-only data. |
Michael Gerbracht (180) 104 posts |
Thanks for looking at the code. I will have a look at get_response_status and change it the way you suggested. Regarding the HTTPLib – I could change it in my copy but the library is from Chris Mahoney – so it would be better if he makes the change since the library might be used in other applications, too. Unfortunately I don’t have the e-mail address of Chris so I hope he will read your post here. |
Chris Mahoney (1684) 2165 posts |
I’ll take a look when I get a chance (although I’m a bit busy this week). I think I did a bit of a rush job with getting header support in there, so now I get to do it properly :) Thanks for tracking it down! |
Chris Mahoney (1684) 2165 posts |
Because I’m a glutton for punishment, I’ve quick-fixed it again. Does this one work? As for the app itself, I have it a quick go. Neat! It’s like a mini version of Insomnia. |
Michael Gerbracht (180) 104 posts |
Thanks Chris, I have uploaded a new version including your bug fix. I did not see a zero pain error anymore with this version. I also included the change Julie suggested – it is much better this way. This was my first attempt to get into C programming and I got a lot of help and support from Jean-Michel Bruck (thanks!). But I wanted a small app to test REST webservices. Since I use REST a lot at work and there are a lot of interesting REST services out there my idea was to find out how to use them from RISC OS. |
GavinWraith (26) 1563 posts |
Where do I get the Toolbox.Tabs module from? |
David Pitt (3386) 1248 posts |
0.12 seems the latest. http://www.riscpkg.org/arm/Tabs/Tabs_0.12 or PackMan |