Switch that can be remotely switched
The best solution is to use a momentary switch to both manually open and close the valve rather than a physical rocker switch - this would require an additional latching circuit to record the switch value and compare it to the current state of the valve and open or close it accordingly. The state of the valve could be displayed by a bi-color LED - red for closed, green for open. Then, the LED would give you the state information (regardless of if the action came from the switch or HTTP request), and the position of the switch would be meaningless since it is only momentary and always "open" unless it is being pressed.

To do what you are suggesting would involve an actuated switch. These do exist, but they are product-specific and typically pretty expensive. A good example is the older style volume knob on some car radios that have steering wheel control - change the volume with the steering wheel buttons and the volume knob on the radio head unit will rotate accordingly. A lot of digital sound mixing boards have a similar feature for recording gain level settings - press a button and all of the levers and knob automatically adjust. 

You could do the same with a rocker switch by connecting internal cables from each end of the switch to a servo motor which would pull the the switch on or off from an HTTP request, and then return to a neutral state to allow manual operation. This solution would be overly complicated - hence the reasoning behind LED indicators and a single momentary push button instead.