Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8385395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:39:32+00:00 2026-06-09T17:39:32+00:00

Okay, before I go on, let me state that my background is in web

  • 0

Okay, before I go on, let me state that my background is in web scripting; so applications are very foreign to me. I know very little about .NET and I’ve been skating by on my limited knowledge.

Anyways, in my application, I have an OAuth httpRequest. The request itself works fine, it gets the data I need from the web API. However, the problem is that whenever I click the button that activates the request, my program freezes for a few seconds until the request is finished. I also have another request which is done automatically every 60 seconds. Which of course means every 60 seconds, my program freezes for a few seconds. How to fix this?

    private string twitchCallAPI(string accessKey, string accessSecret, string endpointURI, string httpMethod)
    {
        OAuthHttpWebRequest httpRequest = new OAuthHttpWebRequest();
        httpRequest.ConsumerToken = new OAuthToken { Token = this.twitchConKey, TokenSecret = this.twitchConSecret };
        httpRequest.Token = new OAuthToken() { Token = accessKey, TokenSecret = accessSecret };
        httpRequest.SetUri(endpointURI);
        httpRequest.Method = httpMethod;

        try
        {
            using (var response = httpRequest.GetResponse())
            {
                using (var reader = new StreamReader(response.GetResponseStream()))
                {
                    return reader.ReadToEnd();
                }
            }
        }
        catch (WebException ex)
        {
            using (var reader = new StreamReader(ex.Response.GetResponseStream()))
            {
                System.Windows.MessageBox.Show(reader.ReadToEnd());
            }
        }
        catch (Exception ex)
        {
            System.Windows.MessageBox.Show(ex.ToString());
        }

        return string.Empty;
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T17:39:33+00:00Added an answer on June 9, 2026 at 5:39 pm

    You could use a background worker

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, i know there have been some questions about this before, but I just
Okay I know I asked about this before, and the answer was basically cache
Okay, a before; Array ( 'home' => array('order' => 1), 'about' => array(), 'folio'
Okay i've seen this done somewhere before where you have a function that takes
Let me just say up front that what I'm aware that what I'm about
Okay, I know this question has been asked before: Previous Question I have also
Okay, two alternatives, but before I begin, you need to know this: public abstract
Okay, I've asked a similar question before, but I've spent about eight hours (really)
Okay, I haven't posted much here before, but I'm struggling with something that I
Okay, I know this has been asked before, but the solutions to previously asked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.