Suppose you have a WCF or Web service that has a method that takes a byte[] parameter. Such method is used for transferring small files across the network.
public TransferSmallFile(byte[] bytes)
Testing this method is difficult but with WCFStorm it becomes easy because it lets you directly load files into the byte[] parameter using the UI.
Let's see how we can do that
- First we need to add a service
- Select the method having the byte array parameter type.
- In the request pane, Select the byte[] parameter. This will cause the Object editor to display the "Click to load file" link. This link will prompt you to select a file in the file system
- Click on "Click to load file" link and select a file.
- The file will then be loaded into the byte[] type automatically