In modern web development using such kind of interfaces is a very common activity. Our application can consume some public RESTful API or just specific to this one application. APIs is everywhere on the internet. It can be used be the people on the internet or by our developers. Regardless that, it is definitely worth to prepare clear documentation to save their time.
During the API creating work, it is necessary to test API calls. We can do this in many ways. One of the good method could be just using browser to enter url in address bar. However using this method we can test only GET requests. Also there is problems with setting up headers.
Other method to test HTTP requests is using cURL format and appropriate software. This is a console program, so it is very extensible and powerful. However it is a console program and it is more complicated to use and we should manage request database on our own. It can be easier.
Fortunately it exists a program Postman. It is a software for all kind of HTTP request work. It can be installed as a standalone application and as a Chrome plug in.
WebAPI is used to serve data from server. One time of data could be images. In this post I will show how to write WebAPI methods operating on images data. So at first we must decide where we want to store our images. Let’s suppose, that we have database that store our application data. We have 2 possibilities: to store images in files or directly in database. This two approaches has following adventages: files easy to test fast requires additional…