I had recently written a C# Rest test for the NetFlix API (which works) and just started to do the same in Java with Rest Assured.
I have the following code which returns an error "403 - Forbidden" when running it, yet I know my Oauth tokens, keys etc are valid because my .Net app runs them just fine.
On Mon, Oct 8, 2012 at 6:15 AM, Jason Lowder <jblow...@gmail.com> wrote:
> Hello,
> I had recently written a C# Rest test for the NetFlix API (which works)
> and just started to do the same in Java with Rest Assured.
> I have the following code which returns an error "403 - Forbidden" when
> running it, yet I know my Oauth tokens, keys etc are valid because my .Net
> app runs them just fine.
> On Mon, Oct 8, 2012 at 6:15 AM, Jason Lowder <jblo...@gmail.com<javascript:> > > wrote:
>> Hello,
>> I had recently written a C# Rest test for the NetFlix API (which works) >> and just started to do the same in Java with Rest Assured.
>> I have the following code which returns an error "403 - Forbidden" when >> running it, yet I know my Oauth tokens, keys etc are valid because my .Net >> app runs them just fine.
Next, I noticed the response came back with encoding=gzip, which it normally doesn't. In my .Net implementation it returns an XML response. The content-type is application/xml. Is there a configuration I can set to not request encoding?
>> On Mon, Oct 8, 2012 at 6:15 AM, Jason Lowder <jblo...@gmail.com> wrote:
>>> Hello,
>>> I had recently written a C# Rest test for the NetFlix API (which works) >>> and just started to do the same in Java with Rest Assured.
>>> I have the following code which returns an error "403 - Forbidden" when >>> running it, yet I know my Oauth tokens, keys etc are valid because my .Net >>> app runs them just fine.
Hm there's no reason why RestAssured.oauth(consumerKey, consumerSecret,
accessToken, secretToken); shouldn't work. It must be a bug, I'll add it to
the issue tracker. I'm planning to make a new release soon and if you're up
for it a pull request would be great!
> Next, I noticed the response came back with encoding=gzip, which it
> normally doesn't. In my .Net implementation it returns an XML response.
> The content-type is application/xml. Is there a configuration I can set
> to not request encoding?
> Thanks,
> Jason
> On Monday, October 8, 2012 4:38:10 PM UTC-5, Jason Lowder wrote:
>> Hi,
>> The Jar files are in my external library and part of the classpath. From
>> what I can tell they are using OAuth 1.0.
>> Is there anything else to look at?
>> Thanks,
>> Jason
>> On Monday, October 8, 2012 1:28:14 AM UTC-5, Johan Haleby wrote:
>>> On Mon, Oct 8, 2012 at 6:15 AM, Jason Lowder <jblo...@gmail.com> wrote:
>>>> Hello,
>>>> I had recently written a C# Rest test for the NetFlix API (which works)
>>>> and just started to do the same in Java with Rest Assured.
>>>> I have the following code which returns an error "403 - Forbidden"
>>>> when running it, yet I know my Oauth tokens, keys etc are valid because my
>>>> .Net app runs them just fine.
And as a work-around if the latter statement works you can create try to
create a filter
<https://code.google.com/p/rest-assured/wiki/Usage#Filters> that
you later can configure statically (RestAssured.filters ) so you don't have
to duplicate your code.
On Tue, Oct 9, 2012 at 8:20 AM, Johan Haleby <johan.hal...@gmail.com> wrote:
> Hm there's no reason why RestAssured.oauth(consumerKey, consumerSecret,
> accessToken, secretToken); shouldn't work. It must be a bug, I'll add it to
> the issue tracker. I'm planning to make a new release soon and if you're up
> for it a pull request would be great!
> /Johan
> On Tue, Oct 9, 2012 at 12:45 AM, Jason Lowder <jblow...@gmail.com> wrote:
>> Next, I noticed the response came back with encoding=gzip, which it
>> normally doesn't. In my .Net implementation it returns an XML response.
>> The content-type is application/xml. Is there a configuration I can set
>> to not request encoding?
>> Thanks,
>> Jason
>> On Monday, October 8, 2012 4:38:10 PM UTC-5, Jason Lowder wrote:
>>> Hi,
>>> The Jar files are in my external library and part of the classpath.
>>> From what I can tell they are using OAuth 1.0.
>>> Is there anything else to look at?
>>> Thanks,
>>> Jason
>>> On Monday, October 8, 2012 1:28:14 AM UTC-5, Johan Haleby wrote:
>>>> On Mon, Oct 8, 2012 at 6:15 AM, Jason Lowder <jblo...@gmail.com> wrote:
>>>>> Hello,
>>>>> I had recently written a C# Rest test for the NetFlix API (which
>>>>> works) and just started to do the same in Java with Rest Assured.
>>>>> I have the following code which returns an error "403 - Forbidden"
>>>>> when running it, yet I know my Oauth tokens, keys etc are valid because my
>>>>> .Net app runs them just fine.
>>>>> Is there something wrong with my usage here?
I just entered the Java world a couple days ago so some of this open source terminology is a bit confusing to me. :-) How do I make a pull request?
Also, do you have any comment on the return content being gzip encrypted? Either I'm leaving something out of a header or otherwise that was naturally included in .Net to prevent the encryption. I didn't see anything in the docs that lead me to what I might need to do.
On Tuesday, October 9, 2012 1:20:48 AM UTC-5, Johan Haleby wrote:
> Hm there's no reason why RestAssured.oauth(consumerKey, consumerSecret, > accessToken, secretToken); shouldn't work. It must be a bug, I'll add it to > the issue tracker. I'm planning to make a new release soon and if you're up > for it a pull request would be great!
> /Johan
> On Tue, Oct 9, 2012 at 12:45 AM, Jason Lowder <jblo...@gmail.com<javascript:> > > wrote:
>> Next, I noticed the response came back with encoding=gzip, which it >> normally doesn't. In my .Net implementation it returns an XML response. >> The content-type is application/xml. Is there a configuration I can set >> to not request encoding?
>> Thanks,
>> Jason
>> On Monday, October 8, 2012 4:38:10 PM UTC-5, Jason Lowder wrote:
>>> Hi,
>>> The Jar files are in my external library and part of the classpath. >>> From what I can tell they are using OAuth 1.0.
>>> Is there anything else to look at?
>>> Thanks,
>>> Jason
>>> On Monday, October 8, 2012 1:28:14 AM UTC-5, Johan Haleby wrote:
>>>> On Mon, Oct 8, 2012 at 6:15 AM, Jason Lowder <jblo...@gmail.com> wrote:
>>>>> Hello,
>>>>> I had recently written a C# Rest test for the NetFlix API (which >>>>> works) and just started to do the same in Java with Rest Assured.
>>>>> I have the following code which returns an error "403 - Forbidden" >>>>> when running it, yet I know my Oauth tokens, keys etc are valid because my >>>>> .Net app runs them just fine.
>>>>> Is there something wrong with my usage here?
A pull request is for Github and is described
here<https://help.github.com/articles/using-pull-requests>:) I can't
answer why you get a gzip response in when defining oauth
statically. The reason may be that HTTP Builder always adds "gzip" to the
header. This is something that I want to make configurable (of course) but
I haven't had time to do so yet.. There's so much to do! :)
On Tue, Oct 9, 2012 at 4:50 PM, Jason Lowder <jblow...@gmail.com> wrote:
> Hi Johan,
> I just entered the Java world a couple days ago so some of this open
> source terminology is a bit confusing to me. :-) How do I make a pull
> request?
> Also, do you have any comment on the return content being gzip encrypted?
> Either I'm leaving something out of a header or otherwise that was
> naturally included in .Net to prevent the encryption. I didn't see
> anything in the docs that lead me to what I might need to do.
> Thanks again,
> Jason
> On Tuesday, October 9, 2012 1:20:48 AM UTC-5, Johan Haleby wrote:
>> Hm there's no reason why RestAssured.oauth(**consumerKey,
>> consumerSecret, accessToken, secretToken); shouldn't work. It must be a
>> bug, I'll add it to the issue tracker. I'm planning to make a new release
>> soon and if you're up for it a pull request would be great!
>> /Johan
>> On Tue, Oct 9, 2012 at 12:45 AM, Jason Lowder <jblo...@gmail.com> wrote:
>>> Next, I noticed the response came back with encoding=gzip, which it
>>> normally doesn't. In my .Net implementation it returns an XML response.
>>> The content-type is application/xml. Is there a configuration I can set
>>> to not request encoding?
>>> Thanks,
>>> Jason
>>> On Monday, October 8, 2012 4:38:10 PM UTC-5, Jason Lowder wrote:
>>>> Hi,
>>>> The Jar files are in my external library and part of the classpath.
>>>> From what I can tell they are using OAuth 1.0.
>>>> Is there anything else to look at?
>>>> Thanks,
>>>> Jason
>>>> On Monday, October 8, 2012 1:28:14 AM UTC-5, Johan Haleby wrote:
>>>>> On Mon, Oct 8, 2012 at 6:15 AM, Jason Lowder <jblo...@gmail.com>wrote:
>>>>>> Hello,
>>>>>> I had recently written a C# Rest test for the NetFlix API (which
>>>>>> works) and just started to do the same in Java with Rest Assured.
>>>>>> I have the following code which returns an error "403 - Forbidden"
>>>>>> when running it, yet I know my Oauth tokens, keys etc are valid because my
>>>>>> .Net app runs them just fine.
>>>>>> Is there something wrong with my usage here?