CodePaste Logo
New Snippet New Recent Snippets Recent Snippets My Snippets My Snippets My Favorites Favorites Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of rest
/* Google jquery CDN 
 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> */
   
            $.ajax(
            {
                type: "POST",
                contentType: "application/json; charset=utf-8",
                url: "services/FeedService.svc/ServiceMethod",
                data: '{"param1":"data1" , "param2":"data2"}',
                dataType: "json",
by frank2tek   October 04, 2011 @ 11:25am
463 Views
no comments
 
<system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="True"/>
    <services>
      <service behaviorConfiguration="SyndicationServerBehavior" name="SimpleBolg.services.FeedService">
        <endpoint behaviorConfiguration="AjaxBehavior" binding="webHttpBinding" contract="SimpleBolg.services.IFeedService"/>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="SyndicationServerBehavior">
by frank2tek   October 04, 2011 @ 11:20am
469 Views
no comments
 
C#
routes.AddRoute<OrdersResource>("/Orders");
routes.AddRoute<OrdersResource>("/Orders/{Order}")
 
public class OrdersResource {
  //dependencies can be injected
  public OrdersResource(IRepository<Order> orderRepository) {
  }

  public JsonResponseMessage GetOrders() {}  // allows explict mapping for contentneg based on return value
  public XmlResponseMessage GetOrders() {}
by Glenn Block   June 26, 2010 @ 11:50am
Tags: REST
2299 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Mvc;
using Westwind.Utilities;
using System.ServiceModel.Syndication;
using CodePasteBusiness;
using System.Text;
using System.Collections;
using System.IO;
by Rick Strahl   August 10, 2009 @ 4:44pm
3047 Views
no comments
 
brought to you by:
West Wind Techologies