Giter Site home page Giter Site logo

httpclientextras's Introduction

HttpClientExtras

This is a set of handlers to provide different signatures for the HttpClient requests:

  • OAuthProtectedResourceMessageHandler (OAuth1)
  • OAuthClientAuthMessageHandler (2-legged OAuth1)
  • AzureTableMessageHandler

The main library is portable, there are platform-specific adapters to use encryption services.

httpclientextras's People

Contributors

saldoukhov avatar

Stargazers

Media Explorer avatar Adriano Machado avatar TUPUNCO avatar

Watchers

James Cloos avatar

httpclientextras's Issues

HttpClientExtras.OAuthClientAuthMessageHandler type missing

I'm trying to use HttpClientExtras library to deal with OAuth1 in my RT application.
I can't find type HttpClientExtras.OAuthClientAuthMessageHandler after installing this library with help of NUGET
PM> Install-Package HttpClientExtras
or
PM> Install-Package HttpClientExtras.RT

Can you please tell me where I can find this type/class?

POST request with url encoded content where any parameter will contain the space character in its value

Hello,

I'm trying to do POST request to some API resource and I need to pass a few parameters as a request body, one of parameter has a value with space character.
The parameter name is "name" and its value is "Fiddler Root.cer". As you can see file name contains a space character.

Content has been created with help of class FormUrlEncodedContent, e.g.

Content = new FormUrlEncodedContent(....

The request example here:

POST https://api.website.com/v1_1/upload HTTP/1.1
Content-Type: application/x-www-form-urlencoded
name=Fiddler+Root.cer&folderId=QhF3PaxT&size=950

But as you can see I have an error, Invalid signature. I think that during the generation and signing of oauth header signature, HttpClientExtras lib has double encoding problem.

HTTP/1.1 401 Unauthorized
Set-Cookie: classicView=false; Domain=4shared.com; Expires=Sat, 27-Jan-2018 16:10:32 GMT; Path=/
Server: 292
Vary: *
Content-Type: application/json;charset=UTF-8
Content-Length: 469
Date: Sun, 07 Feb 2016 16:10:32 GMT

{"message":"Unauthorized.","code":"401.0300","cause":"Invalid signature. Signature base string : POST&https%3A%2F%2Fapi.website.com%2Fv1_1%2Fupload&folderId%3DIZse5M9o%26name%3DFiddler%2520Root.cer%26oauth_consumer_key%3D984c186378bb8f1c39e3928417ac0b63%26oauth_nonce%3Dzfgwi9456eoxj7f4%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1454861431%26oauth_token%3Ded0137b644dd042aa534392cd0eb0dda%26oauth_version%3D1.0%26size%3D950 Signature method : HMAC-SHA1"}

Could you please take a look to any POST request with url encoded content where any parameter will contain the space character in its value?
Could you approve or decline my suggestion about the double encoding in your lib?
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.