Questions tagged [hammock]

Hammock is a C# HTTP API client for consuming REST web services.

Hammock is an HTTP API library for .NET that simplifies consuming and wrapping RESTful services. You can find more information and its source at its GitHub page.

Installation

Hammock can most easily be installed through its NuGet package.

Install-Package Hammock 
46 questions
48
votes
8 answers

Deserializing JSON array into strongly typed .NET object

When I can call the 3rd party api and get back a single class worth of data everything deserialises fine using this code TheUser me = jsonSerializer.Deserialize(response, typeof(TheUser)) as TheUser The problem comes when I try and deserialise…
Pat Long - Munkii Yebee
  • 3,592
  • 2
  • 34
  • 68
5
votes
3 answers

Invalid cross-thread access in Silverlight app

I am using the Hammock framework to make asyncronous service calls from a Silverlight application to Rest services. In the 'completed' callback I am updating an ObservableCollection that is bound to a combobox on the view. An 'Invalid cross-thread…
Jim Reineri
  • 2,830
  • 3
  • 31
  • 32
4
votes
1 answer

Twitter API, Tweets with Images, Error Code 324 "The validation of media ids failed."

I have been able to successfully post status updates with images attached. I am using C#/.NET with a REST framework called Hammock. First, I upload the images to upload.twitter.com/1.1/media/upload.json and get media_ids back. Then, I make a request…
jreancsu
  • 421
  • 5
  • 13
4
votes
2 answers

Twitter, OAuth, Hammock, TweetSharp and Windows Phone 7

I've been trying for days to get OAuth working with Twitter in my Windows Phone app, but all the information I find is out dated or difficult to follow. I eventually got somewhere when I found this blog post…
user348040
3
votes
1 answer

TweetSharp exception if callback url contains IP Address

I may have stumbled onto a strange bug thats within either TweetSharp or Hammock. When trying to get an authorization token from Twitter via the normal routine of: TwitterService service = new TwitterService(API_KEY,API_SECRET); OAuthRequestToken…
J. Minjire
  • 1,003
  • 11
  • 22
2
votes
6 answers

Retrieve Linkedin email address

I'm using the Hammock library and C# to get the basic profile and email address of user from linked in following post here . I've also followed these posts here and here However for the life of me I cannot get the email address of the linkedin…
Hamza Ahmed
  • 1,571
  • 4
  • 18
  • 35
1
vote
1 answer

Using Hammock library for Linkedin access getting "oauth expires in = 0" error

I have used the hammock library for Linkedin access in my windows mobile application. I modified the twitter Hammock library for linked access.After access token it stated…
SENTHIL KUMAR
  • 647
  • 4
  • 17
1
vote
2 answers

Error posting a share on LinkedIn using Hammock lib

I'm trying to send a new Share on a Linkedin Person. This is my client code: RestClient client = new RestClient() { Authority = "http://api.linkedin.com/v1", Credentials =…
Massimo Zerbini
  • 3,125
  • 22
  • 22
1
vote
1 answer

Using Hammock to Call Recurly REST API with BasicAuthCredentials

I'm trying to call the Recurly REST API using the Hammock C# library for .NET. The API calls require an Authorization header on the HttpRequest, and the authentication scheme is Basic authentication with the Base64 encoded API key in the username…
Rich Miller
  • 810
  • 1
  • 9
  • 20
1
vote
1 answer

What is the Difference Between Hammock and Hammock.ClientProfile?

I am attempting to use Hammock as a library to enable easy access to a REST API. When I add the package using nuget in Visual Studio 2010, it adds 2 references: Hammock Hammock.ClientProfile However, when I attempt to use the hammock classes and…
qxotk
  • 2,384
  • 5
  • 24
  • 39
1
vote
0 answers

Can I use DotNetOpenAuth with Hammock?

The consumer application I'm writing needs to use the REST API from LinkedIn. Currently I have the basic OAuth flow code working using Hammock. But I'm not yet storing the OAuth access tokens. I have looked at DotNetOpenAuth and concluded that using…
Michiel van Oosterhout
  • 22,839
  • 15
  • 90
  • 132
1
vote
1 answer

Error in LinkedIn using Hammock

I am using LinkedIn Hammock , after call back it gives error oauth_problem=parameter_absent&oauth_parameters_absent=oauth_verifier OAuthCredentials credentials = new OAuthCredentials(); credentials.ConsumerKey = "Consumer key"; …
user652132
  • 11
  • 2
1
vote
0 answers

REST Hammock not adding content to post body

I've been fiddling a POST request that isn't working. What I've found is that the content of the request is empty even though I believe I'm adding it correctly (even though there aren't any docs available that I can find). var json =…
Jason Butera
  • 2,376
  • 3
  • 29
  • 46
1
vote
1 answer

Integrate the swagger ui into hammock

I am building up a CDI/REST Environment as basis for several projects by using hammock. What I would like to have besides CDI and REST is also json schema for generating payload classes and an automatically generated REST API documentation via…
magicroomy
  • 395
  • 1
  • 6
  • 19
1
vote
0 answers

Terminate Async Begin Request From Outside

I have already searched for lots of questions and answers, but still not manage to fix the issue yet. CancellationTokenSource not working for me, cuz any cancellationtokensource method ends the async request within the async method. Not from the…
ilerleartik
  • 115
  • 8
1
2 3 4