Open your form library in InfoPaht Designier and go to data and data connections
click add and select Receive data and click next in the options select REST Web service and click next in the text box past your REST URL for example: http://YourServer/YourSite/_vti_bin/ListData.svc/RepClaimsGuestList?$orderby=EventGiftRefID desc&$top=1
click next give it a name and click finish.
now for example we want to use it in Form Load,
Go to data select Form Load than select manage rules and create a rule than in the run these actions click the Add select Change REST URL select your rest connection and past your REST URL.