title: Post Rocket route is forwarded (Rust)
body: <p>Sorry to ask such a basic question, there's little info about this in Stack Overflow and GitHub. This must be something silly, but I'm not getting it.</p>
  <p>I'm trying to send via JavaScript's <code>fetch</code> to a Rust post endpoint with Rocket 0.5 RC1. But I'm getting hit by:</p>
  <blockquote>
  <p>No matching routes for POST /api/favorites application/json.</p>
  </blockquote>
  <p>Here's the complete log:</p>
  <pre><code>    POST /api/favorites application/json: 
      Matched: (post_favorites) POST /api/favorites
      `Form &lt; FavoriteInput &gt;` data guard is forwarding.
      Outcome: Forward
      No matching routes for POST /api/favorites application/json.  
      No 404 catcher registered. Using Rocket default.
      Response succeeded.
  </code></pre>
  <p>Here's my main.rs file (Irrelevant parts omitted):</p>
  <pre class="lang-rust prettyprint-override"><code>#[rocket::main]
  async fn main() -&gt; Result&lt;(), Box&lt;dyn Error&gt;&gt; {
      let cors = CorsOptions::default()
          .allowed_origins(AllowedOrigins::all())
          .allowed_methods(
              vec![Method::Get, Method::Post, Method::Patch]
                  .into_iter()
                  .map(From::from)
                  .collect(),
          )
          .allow_credentials(true)
          .to_cors()?;
  
      rocket::build()
          .mount(&quot;/api&quot;, routes![index, upload::upload, post_favorites])
          .attach(cors)
          .launch()
          .await?;
  
      Ok(())
  }
  
  #[post(&quot;/favorites&quot;, data = &quot;&lt;input&gt;&quot;)]
  async fn post_favorites(input: Form&lt;FavoriteInput&gt;) -&gt; Json&lt;Favorite&gt; {
      let doc = input.into_inner();
      let fav = Favorite::new(doc.token_id, doc.name);
      let collection = db().await.unwrap().collection::&lt;Favorite&gt;(&quot;favorites&quot;);
      collection.insert_one(&amp;fav, None).await.unwrap();
      Json(fav)
  }
  
  </code></pre>
  <p>Here's my cargo.toml:</p>
  <pre><code>
  [dependencies]
  rocket = {version =&quot;0.5.0-rc.1&quot;, features=[&quot;json&quot;]}
  rocket_cors = { git = &quot;https://github.com/lawliet89/rocket_cors&quot;, branch = &quot;master&quot; }
  reqwest = {version = &quot;0.11.6&quot;, features = [&quot;json&quot;] }
  serde= {version = &quot;1.0.117&quot;, features= [&quot;derive&quot;]}
  mongodb = &quot;2.1.0&quot;
  rand = &quot;0.8.4&quot;
  uuid = {version = &quot;0.8&quot;, features = [&quot;serde&quot;, &quot;v4&quot;] }
  </code></pre>
  <p>Here are my structs:</p>
  <pre class="lang-rust prettyprint-override"><code>#[path = &quot;./paste.rs&quot;]
  mod paste;
  
  #[derive(Serialize, Deserialize, Debug)]
  pub struct Favorite {
      pub id: String,
      pub token_id: String,
      pub name: String,
  }
  
  impl Favorite {
      pub fn new(token_id: String, name: String) -&gt; Favorite {
          let id = Uuid::new_v4().to_string();
          let fav = Favorite { token_id, name, id };
  
          fav
      }
  }
  
  #[derive(FromForm, Serialize, Deserialize, Debug)]
  pub struct FavoriteInput {
      pub token_id: String,
      pub name: String,
  }
  
  </code></pre>
  <p>Here's the token payload:</p>
  <p><a href="https://i.stack.imgur.com/bbne0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bbne0.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/MmKlk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MmKlk.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/BGnW9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BGnW9.png" alt="enter image description here" /></a></p>
  <p>I've tried with parameter-less get requests and they were successful.</p>
  <p>I thought the <code>Form</code> struct was reading and correctly parsing the <code>FavoriteInput</code> as it allows for missing/extra fields.</p>
  <p>There must be something silly that I'm doing wrong. Any ideas?</p>