Skip to content

Instantly share code, notes, and snippets.

@DevJohnC
Created December 30, 2011 23:37
Show Gist options
  • Select an option

  • Save DevJohnC/1542052 to your computer and use it in GitHub Desktop.

Select an option

Save DevJohnC/1542052 to your computer and use it in GitHub Desktop.
[ServiceDirectory("/examples")] // cause the request to be handled at /servicestack/{FORMAT}/syncreply/examples/HelloWorld
public class HelloWorldService : IService<HelloWorld>
{
public object Execute(HelloWorld request)
{
return new HelloWorldResponse() { Text = "Hello World" };
}
}
@mythz
Copy link
Copy Markdown

mythz commented Dec 30, 2011

why don't you just use the prettier?

[RestService("/examples/helloworld")]
public class HelloWorld {}

at url: /servicestack/examples/helloworld

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment