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 8117999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:20:41+00:00 2026-06-06T04:20:41+00:00

I am trying to make a REST request to a Neo4j instance hosted via

  • 0

I am trying to make a REST request to a Neo4j instance hosted via heroku. The server is setup with Basic Authentication.

This is the url I was provided with from Heroku (notice the trailing slash): http://username:password@instance.hosted.neo4j.org:123/db/data/

I’m using RestSharp to connect to this instance. However, RestSharp will remove the trailing slash. Code. The resulting url becomes: http://username:password@instance.hosted.neo4j.org:123/db/data

This results in a HTTP 301 to (notice the trailing slash): http://username:password@instance.hosted.neo4j.org:123/db/data/

The problem is that the Authorization Header is not persisted across redirects MSDN. This redirect results in HTTP 401.

Are there any obvious ways around this? I’ve tried the following:

  • Provide 2 trailing slashes /db/data// so RestSharp only removed one slash but leaves one remaining. This doesn’t work as other requests have invalid formats: /db/data//query/stuff
  • Use CredentialCache class. This works but results in 2 requests per action (One for the 401 challenge, another one for the response)
  • IAuthenticationModlue – Found minimal info on this in MSDN but after trying a custom class, this will still result in the double hop issue noted previously.
  • Change the initial rest request to be new RestRequest("/", Method.GET); instead of new RestRequest("", Method.GET); – the only probelm is I don’t want to modify the Open Source project that is in between my app and RestSharp for my specific needs. RestSharp removes all ending slashes
  • 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-06T04:20:43+00:00Added an answer on June 6, 2026 at 4:20 am

    From pete at the Google Group:

    One, somewhat annoying, workaround for requesting the “root resource” is
    to use: new RestRequest (“/ “), the trailing whitespace will prevent
    RestSharp from trimming the slash, but will be ignored by (most)
    servers.

    https://groups.google.com/forum/?fromgroups#!topic/restsharp/8mBmaXksmsg

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

Sidebar

Related Questions

I am trying to use LWP::Simple to make a GET request to a REST
What i am trying to do here is make post request to Rest webserivce
I am trying to make a very basic REST call to my MVC 3
I'm trying to do this: Make spring security add the return to url in
I'm trying to make a rest request in java. I tested the web service
I am trying to make it stop showing the rest if $walk_jail is not
Trying to make this function dynamic instead of static. This was the original code
Trying to make a simple program to catalogue books. Something like this, for example:
Trying to make a simple program to catalogue books. Something like this, for example:
This is on .Net 4, full framework. I'm trying to make a simple winforms

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.